01: /* Generated By:JJTree: Do not edit this line. ASTTarget.java */
02:
03: package org.codehaus.aspectwerkz.expression.ast;
04:
05: import org.codehaus.aspectwerkz.expression.ExpressionInfo;
06: import org.codehaus.aspectwerkz.expression.SubtypePatternType;
07: import org.codehaus.aspectwerkz.expression.regexp.TypePattern;
08:
09: public class ASTTarget extends SimpleNode {
10:
11: private String m_identifier;
12:
13: public ASTTarget(int id) {
14: super (id);
15: }
16:
17: public ASTTarget(ExpressionParser p, int id) {
18: super (p, id);
19: }
20:
21: /** Accept the visitor. **/
22: public Object jjtAccept(ExpressionParserVisitor visitor, Object data) {
23: return visitor.visit(this , data);
24: }
25:
26: public void setIdentifier(String identifier) {
27: m_identifier = identifier;
28: }
29:
30: public String getIdentifier() {
31: return m_identifier;
32: }
33:
34: public String getBoundedType(ExpressionInfo info) {
35: // fast check if it seems to be a bounded type
36: if (m_identifier.indexOf(".") < 0) {
37: String boundedType = info.getArgumentType(m_identifier);
38: if (boundedType != null) {
39: return boundedType;
40: }
41: }
42: return m_identifier;
43: }
44: }
|