forked from phoedos/pmd
Updated ASTExplicitConstructor invocation; added aa getArgumentCount() method
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1413 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -18,6 +18,7 @@ public class ASTArguments extends SimpleNode {
|
||||
}
|
||||
return this.jjtGetChild(0).jjtGetNumChildren();
|
||||
}
|
||||
|
||||
/** Accept the visitor. **/
|
||||
public Object jjtAccept(JavaParserVisitor visitor, Object data) {
|
||||
return visitor.visit(this, data);
|
||||
|
@ -17,6 +17,10 @@ public class ASTExplicitConstructorInvocation extends SimpleNode {
|
||||
return visitor.visit(this, data);
|
||||
}
|
||||
|
||||
public int getArgumentCount() {
|
||||
return ((ASTArguments)this.jjtGetChild(0)).getArgumentCount();
|
||||
}
|
||||
|
||||
private boolean isThis;
|
||||
private boolean isSuper;
|
||||
|
||||
|
@ -11,7 +11,7 @@ import net.sourceforge.pmd.ast.ASTArguments;
|
||||
public class SymbolTableTestRule extends AbstractRule implements Rule {
|
||||
|
||||
public Object visit(ASTExplicitConstructorInvocation node, Object data) {
|
||||
System.out.println("ASTExplicitConstructorInvocation: arg count = " + ((ASTArguments)node.jjtGetChild(0)).getArgumentCount());
|
||||
System.out.println("ASTExplicitConstructorInvocation: arg count = " + node.getArgumentCount());
|
||||
return super.visit(node,data);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user