1 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 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, SubtypePatternType.MATCH_ON_ALL_METHODS); 31 } else { 32 m_typePattern = Pattern.compileTypePattern(pattern, SubtypePatternType.NOT_HIERARCHICAL); 33 } 34 } 35 36 public TypePattern getTypePattern() { 37 return m_typePattern; 38 } 39 40 } | Popular Tags |