public boolean isSpecialCall() { return isThisCall() || isSuperCall(); }
public String getText() { String text = null; if (isSuperCall()) { text = "super "; } else if (isThisCall()) { text = "this "; } else { text = "new " + getType().getName(); } return text + arguments.getText(); }
if (first != null && (first.isThisCall())) return;
private boolean shouldImplicitlyPassThisPara(ConstructorCallExpression cce) { boolean pass = false; ClassNode superCN = classNode.getSuperClass(); if (cce.isThisCall()) { pass = true; } else if (cce.isSuperCall()) { // if the super class is another non-static inner class in the same outer class hierarchy, implicit this // needs to be passed if (!superCN.isEnum() && !superCN.isInterface() && superCN instanceof InnerClassNode) { InnerClassNode superInnerCN = (InnerClassNode) superCN; if (!isStatic(superInnerCN) && classNode.getOuterClass().isDerivedFrom(superCN.getOuterClass())) { pass = true; } } } return pass; }
return; ClassNode receiver = call.isThisCall() ? typeCheckingContext.getEnclosingClassNode() : call.isSuperCall() ? typeCheckingContext.getEnclosingClassNode().getSuperClass() : call.getType(); Expression arguments = call.getArguments();
public boolean isSpecialCall(){ return isThisCall() || isSuperCall(); }
public boolean isSpecialCall() { return isThisCall() || isSuperCall(); }
public boolean isSpecialCall(){ return isThisCall() || isSuperCall(); }
public boolean isSpecialCall(){ return isThisCall() || isSuperCall(); }
public String getText() { String text = null; if (isSuperCall()) { text = "super "; } else if (isThisCall()) { text = "this "; } else { text = "new " + getType().getName(); } return text + arguments.getText(); }
public String getText() { String text = null; if (isSuperCall()) { text = "super "; } else if (isThisCall()) { text = "this "; } else { text = "new "+ getType().getName(); } return text + arguments.getText(); }
public String getText() { String text = null; if (isSuperCall()) { text = "super "; } else if (isThisCall()) { text = "this "; } else { text = "new "+ getType().getName(); } return text + arguments.getText(); }
public String getText() { String text = null; if (isSuperCall()) { text = "super "; } else if (isThisCall()) { text = "this "; } else { text = "new "+ getType().getName(); } return text + arguments.getText(); }
if (first!=null && first.isThisCall()) return;
if (first!=null && first.isThisCall()) return;
if (first!=null && first.isThisCall()) return;
if (first != null && (first.isThisCall())) return;
private boolean shouldImplicitlyPassThisPara(ConstructorCallExpression cce) { boolean pass = false; ClassNode superCN = classNode.getSuperClass(); if (cce.isThisCall()) { pass = true; } else if (cce.isSuperCall()) { // if the super class is another non-static inner class in the same outer class hierarchy, implicit this // needs to be passed if (!superCN.isEnum() && !superCN.isInterface() && superCN instanceof InnerClassNode) { InnerClassNode superInnerCN = (InnerClassNode) superCN; if (!isStatic(superInnerCN) && classNode.getOuterClass().isDerivedFrom(superCN.getOuterClass())) { pass = true; } } } return pass; }
if (!body.isEmpty() && body.get(0) instanceof ExpressionStatement && ((ExpressionStatement) body.get(0)).getExpression() instanceof ConstructorCallExpression) { ConstructorCallExpression cce = (ConstructorCallExpression) ((ExpressionStatement) body.get(0)).getExpression(); if (cce.isThisCall()) { // these are fine as is visitor.visitMethod(c); continue;