ConstructorInvocation(ASTExplicitConstructorInvocation eci) { this.eci = eci; List<ASTArguments> l = eci.findChildrenOfType(ASTArguments.class); if (!l.isEmpty()) { ASTArguments aa = l.get(0); count = aa.getArgumentCount(); argumentTypes = ConstructorCallsOverridableMethodRule.getArgumentTypes(aa); } name = eci.getImage(); }
/** * Returns {@code true} if the constructor simply invokes superclass constructor * with no arguments or doesn't invoke any constructor, otherwise {@code false}. * * @param cons the node to check */ private boolean hasDefaultConstructorInvocation(ASTConstructorDeclaration cons) { ASTExplicitConstructorInvocation inv = cons.getFirstChildOfType(ASTExplicitConstructorInvocation.class); return inv == null || inv.isSuper() && inv.getArgumentCount() == 0; }
public int getArgumentCount() { if (this.jjtGetNumChildren() == 1) { return ((ASTArguments) this.jjtGetChild(0)).getArgumentCount(); } else { return ((ASTArguments) this.jjtGetChild(1)).getArgumentCount(); } }
final public void ExplicitConstructorInvocation() throws ParseException { ASTExplicitConstructorInvocation jjtn000 = new ASTExplicitConstructorInvocation(this, JJTEXPLICITCONSTRUCTORINVOCATION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { if (jj_2_19(2147483647)) { jj_consume_token(THIS); jjtn000.setIsThis(); Arguments(); jj_consume_token(SEMICOLON); TypeArguments(); jj_consume_token(THIS); jjtn000.setIsThis(); Arguments(); jj_consume_token(SEMICOLON); jjtn000.setIsSuper(); Arguments(); jj_consume_token(SEMICOLON); if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtn000.jjtSetLastToken(getToken(0));
extras.add(String.valueOf(((ASTExplicitConstructorInvocation) node).getArgumentCount())); if (((ASTExplicitConstructorInvocation) node).isThis()) { extras.add("this"); if (((ASTExplicitConstructorInvocation) node).isSuper()) { extras.add("super");
if (eci != null && eci.isThis()) { getCurrentEvalPackage().calledConstructors.add(ch.getCalledConstructor());
final public void ExplicitConstructorInvocation() throws ParseException { ASTExplicitConstructorInvocation jjtn000 = new ASTExplicitConstructorInvocation(this, JJTEXPLICITCONSTRUCTORINVOCATION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { if (jj_2_19(2147483647)) { jj_consume_token(THIS); jjtn000.setIsThis(); Arguments(); jj_consume_token(SEMICOLON); TypeArguments(); jj_consume_token(THIS); jjtn000.setIsThis(); Arguments(); jj_consume_token(SEMICOLON); jjtn000.setIsSuper(); Arguments(); jj_consume_token(SEMICOLON); if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); jjtn000.jjtSetLastToken(getToken(0));
extras.add(String.valueOf(((ASTExplicitConstructorInvocation) node).getArgumentCount())); if (((ASTExplicitConstructorInvocation) node).isThis()) { extras.add("this"); if (((ASTExplicitConstructorInvocation) node).isSuper()) { extras.add("super");
if (eci != null && eci.isThis()) { getCurrentEvalPackage().calledConstructors.add(ch.getCalledConstructor());
ConstructorInvocation(ASTExplicitConstructorInvocation eci) { this.eci = eci; List<ASTArguments> l = eci.findChildrenOfType(ASTArguments.class); if (!l.isEmpty()) { ASTArguments aa = l.get(0); count = aa.getArgumentCount(); argumentTypes = ConstructorCallsOverridableMethodRule.getArgumentTypes(aa); } name = eci.getImage(); }
public int getArgumentCount() { if (this.jjtGetNumChildren() == 1) { return ((ASTArguments) this.jjtGetChild(0)).getArgumentCount(); } else { return ((ASTArguments) this.jjtGetChild(1)).getArgumentCount(); } }
/** * Returns {@code true} if the constructor simply invokes superclass constructor * with no arguments or doesn't invoke any constructor, otherwise {@code false}. * * @param cons the node to check */ private boolean hasDefaultConstructorInvocation(ASTConstructorDeclaration cons) { ASTExplicitConstructorInvocation inv = cons.getFirstChildOfType(ASTExplicitConstructorInvocation.class); return inv == null || inv.isSuper() && inv.getArgumentCount() == 0; }