1 22 23 package org.jboss.aop.pointcut.ast; 24 25 import java.util.ArrayList ; 26 27 public class ASTField extends SimpleNode 28 { 29 public ASTField(int id) 30 { 31 super(id); 32 } 33 34 public ASTField(PointcutExpressionParser p, int id) 35 { 36 super(p, id); 37 } 38 39 40 41 public Object jjtAccept(PointcutExpressionParserVisitor visitor, Object data) 42 { 43 return visitor.visit(this, data); 44 } 45 46 public Object jjtAccept(TypeExpressionParserVisitor visitor, Object data) 47 { 48 return visitor.visit(this, data); 49 } 50 51 String typeExpression; 52 ClassExpression type; 53 String classExpr; 54 ClassExpression clazz; 55 String fieldExpr; 56 IdentifierExpression fieldIdentifier; 57 ArrayList attributes = new ArrayList (); 58 59 public void jjtAddChild(Node n, int i) 60 { 61 if (n instanceof ASTAttribute) attributes.add(n); 62 } 63 64 public void setTypeExpression(String type) 65 { 66 this.typeExpression = type; 67 this.type = new ClassExpression(type); 68 } 69 70 public String getTypeExpression() 71 { 72 return typeExpression; 73 } 74 75 public String getClassExpr() 76 { 77 return classExpr; 78 } 79 80 public String getFieldExpr() 81 { 82 return fieldExpr; 83 } 84 85 public void setClassExpr(String classExpr) 86 { 87 this.classExpr = classExpr; 88 clazz = new ClassExpression(classExpr); 89 } 90 91 public void setFieldExpr(String fieldExpr) 92 { 93 this.fieldExpr = fieldExpr; 94 fieldIdentifier = new IdentifierExpression(fieldExpr); 95 } 96 97 public ArrayList getAttributes() 98 { 99 return attributes; 100 } 101 102 public ClassExpression getType() 103 { 104 return type; 105 } 106 107 public ClassExpression getClazz() 108 { 109 return clazz; 110 } 111 112 public IdentifierExpression getFieldIdentifier() 113 { 114 return fieldIdentifier; 115 } 116 } 117 | Popular Tags |