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 java.util.Enumeration;
12: import java.util.Vector;
13: import net.sourceforge.jrefactory.parser.JavaParser;
14: import net.sourceforge.jrefactory.parser.JavaParserVisitor;
15:
16: /**
17: * Contains a set of inequality relationships
18: *
19: * @author Mike Atkinson
20: * @since jRefactory 2.9.0, created October 16, 2003
21: */
22: public class ASTRelationalExpression extends SimpleNode {
23: private Vector names;
24:
25: /**
26: * Constructor for the ASTRelationalExpression node.
27: *
28: * @param identifier The id of this node (JJTRELATIONALEXPRESSION).
29: */
30: public ASTRelationalExpression(int identifier) {
31: super (identifier);
32: names = new Vector();
33: }
34:
35: /**
36: * Constructor for the ASTRelationalExpression node.
37: *
38: * @param parser The JavaParser that created this ASTRelationalExpression node.
39: * @param identifier The id of this node (JJTRELATIONALEXPRESSION).
40: */
41: public ASTRelationalExpression(JavaParser parser, int identifier) {
42: super (parser, identifier);
43: names = new Vector();
44: }
45:
46: /**
47: * Get the object's names
48: *
49: * @return the names in an enumeration
50: */
51: public Enumeration getNames() {
52: return names.elements();
53: }
54:
55: /**
56: * Set the object's name
57: *
58: * @param newName the new name
59: */
60: public void addName(String newName) {
61: if (newName != null) {
62: names.addElement(newName.intern());
63: }
64: }
65:
66: /**
67: * Accept the visitor.
68: *
69: * @param visitor An implementation of JavaParserVisitor that processes the ASTRelationalExpression node.
70: * @param data Some data being passed between the visitor methods.
71: * @return Usually the data parameter (possibly modified).
72: */
73: public Object jjtAccept(JavaParserVisitor visitor, Object data) {
74: return visitor.visit(this, data);
75: }
76: }
|