View Javadoc

1   /* Generated By:JJTree: Do not edit this line. ASTArgParameter.java */
2   
3   package org.codehaus.aspectwerkz.expression.ast;
4   
5   import org.codehaus.aspectwerkz.expression.regexp.TypePattern;
6   import org.codehaus.aspectwerkz.expression.regexp.Pattern;
7   import org.codehaus.aspectwerkz.expression.SubtypePatternType;
8   
9   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      /*** Accept the visitor. * */
21      public Object jjtAccept(ExpressionParserVisitor visitor, Object data) {
22          return visitor.visit(this, data);
23      }
24  
25      public void setTypePattern(String pattern) {
26          if (pattern.endsWith("+")) {
27              pattern = pattern.substring(0, pattern.length() - 1);
28              m_typePattern = Pattern.compileTypePattern(pattern, SubtypePatternType.MATCH_ON_ALL_METHODS);
29          } else {
30              m_typePattern = Pattern.compileTypePattern(pattern, SubtypePatternType.NOT_HIERARCHICAL);
31          }
32      }
33  
34      public TypePattern getTypePattern() {
35          return m_typePattern;
36      }
37  
38  }