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
branch_1_1
hoenicke 25 years ago
parent 60889790b5
commit 7a3d90542b
  1. 22
      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);

Loading…
Cancel
Save