01: /* Generated By:JJTree: Do not edit this line. ASTArgParameter.java */
02:
03: package org.codehaus.aspectwerkz.expression.ast;
04:
05: import org.codehaus.aspectwerkz.expression.regexp.TypePattern;
06: import org.codehaus.aspectwerkz.expression.regexp.Pattern;
07: import org.codehaus.aspectwerkz.expression.SubtypePatternType;
08:
09: public class ASTArgParameter extends SimpleNode {
10: private TypePattern m_typePattern;
11:
12: public ASTArgParameter(int id) {
13: super (id);
14: }
15:
16: public ASTArgParameter(ExpressionParser p, int id) {
17: super (p, id);
18: }
19:
20: /**
21: * Accept the visitor. *
22: */
23: public Object jjtAccept(ExpressionParserVisitor visitor, Object data) {
24: return visitor.visit(this , data);
25: }
26:
27: public void setTypePattern(String pattern) {
28: if (pattern.endsWith("+")) {
29: pattern = pattern.substring(0, pattern.length() - 1);
30: m_typePattern = Pattern.compileTypePattern(pattern,
31: SubtypePatternType.MATCH_ON_ALL_METHODS);
32: } else {
33: m_typePattern = Pattern.compileTypePattern(pattern,
34: SubtypePatternType.NOT_HIERARCHICAL);
35: }
36: }
37:
38: public TypePattern getTypePattern() {
39: return m_typePattern;
40: }
41:
42: }
|