From 7a3d90542bde79139f391062cd1e3ad1eb0ba514 Mon Sep 17 00:00:00 2001 From: hoenicke Date: Mon, 29 May 2000 16:14:17 +0000 Subject: [PATCH] Handle INVOKESPECIAL, where the class expression isn't this. git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1238 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/expr/InvokeOperator.java.in | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/jode/jode/expr/InvokeOperator.java.in b/jode/jode/expr/InvokeOperator.java.in index 007ea3a..5c6b131 100644 --- a/jode/jode/expr/InvokeOperator.java.in +++ b/jode/jode/expr/InvokeOperator.java.in @@ -964,7 +964,10 @@ public final class InvokeOperator extends Operator break; } case SPECIAL: - if (isSuperOrThis()) { + if (isSuperOrThis() + && subExpressions[0] instanceof ThisOperator + && (((ThisOperator)subExpressions[0]).getClassInfo() + == methodAnalyzer.getClazz())) { if (!isThis()) { /* We don't have to check if this is the real super * class, as long as ACC_SUPER is set. @@ -978,6 +981,23 @@ public final class InvokeOperator extends Operator } else { /* XXX check if this is a private method. */ } + } else if (isThis()) { + /* XXX check if this is a private method. */ + if (needsCast(0, paramTypes)){ + writer.print("("); + writer.startOp(writer.EXPL_PAREN, 1); + writer.print("("); + writer.printType(classType); + writer.print(") "); + writer.breakOp(); + subExpressions[0].dumpExpression(writer, 700); + writer.endOp(); + writer.print(")"); + paramTypes[0] = classType; + } else + subExpressions[0].dumpExpression(writer, 950); + writer.breakOp(); + writer.print("."); } else { writer.print("("); writer.startOp(writer.EXPL_PAREN, 0);