01: /*
02: * Author: Mike Atkinson
03: *
04: * This software has been developed under the copyleft
05: * rules of the GNU General Public License. Please
06: * consult the GNU General Public License for more
07: * details about use and distribution of this software.
08: */
09: package net.sourceforge.jrefactory.ast;
10:
11: import net.sourceforge.jrefactory.parser.JavaParser;
12: import net.sourceforge.jrefactory.parser.JavaParserVisitor;
13:
14: /**
15: * Holds the argument list that contains the specific arguments of a method invocation.
16: *
17: * @author Mike Atkinson
18: * @since jRefactory 2.9.0, created October 16, 2003
19: */
20: public class ASTArguments extends SimpleNode {
21: /**
22: * Constructor for the ASTArguments node.
23: *
24: * @param identifier The id of this node (JJTARGUMENTS).
25: */
26: public ASTArguments(int identifier) {
27: super (identifier);
28: }
29:
30: /**
31: * Constructor for the ASTArguments node.
32: *
33: * @param parser The JavaParser that created this ASTArguments node.
34: * @param identifier The id of this node (JJTARGUMENTS).
35: */
36: public ASTArguments(JavaParser parser, int identifier) {
37: super (parser, identifier);
38: }
39:
40: /**
41: * Gets the number of arguments for the ASTArguments node.
42: *
43: * This is the number of children of the first child.
44: *
45: * @return The number of arguments
46: */
47: public int getArgumentCount() {
48: if (this .jjtGetNumChildren() == 0) {
49: return 0;
50: }
51: return this .jjtGetFirstChild().jjtGetNumChildren();
52: }
53:
54: /**
55: * Accept the visitor.
56: *
57: * @param visitor An implementation of JavaParserVisitor that processes the ASTArguments node.
58: * @param data Some data being passed between the visitor methods.
59: * @return Usually the data parameter (possibly modified).
60: */
61: public Object jjtAccept(JavaParserVisitor visitor, Object data) {
62: return visitor.visit(this, data);
63: }
64: }
|