Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.aspectwerkz.expression
Class ExpressionVisitor

    java.lang.Object
      org.codehaus.aspectwerkz.expression.ExpressionVisitor

All Implemented Interfaces:
  ExpressionParserVisitor

Direct Known Subclasses:
  AdvisedClassFilterExpressionVisitor, ArgsIndexVisitor, RuntimeCheckVisitor

    public class ExpressionVisitor

extends Object
implements ExpressionParserVisitor

The expression visitor. If a runtime residual is required (target => instance of check sometimes), Undeterministic matching is used.

Author:
  Jonas BonŽr , Alexandre Vasseur , Michael Nascimento, Alex Popescu

Field Summary
`protected String` | `m_expression`
`protected ExpressionInfo` | `m_expressionInfo` The expressionInfo this visitor is built on
`protected String` | `m_namespace`
`protected Node` | `m_root`

Constructor Summary
`ExpressionVisitor(ExpressionInfo expressionInfo, String expression, String namespace, Node root)` Creates a new expression.

Method Summary
`Node` | `getASTRoot()` Access the ASTRoot we visit
`ExpressionInfo` | `getExpressionInfo()` Access the ExpressionInfo we are build on
`boolean` | `match(ExpressionContext context)` Matches the expression context.
`protected Boolean` | `matchUndeterministic(ExpressionContext context)`
`String` | `toString()` Returns the string representation of the expression.
`Object` | `visit(ASTAnd node, Object data)`
`Object` | `visit(ASTArgParameter node, Object data)`
`Object` | `visit(ASTArgs node, Object data)`
`Object` | `visit(ASTAttribute node, Object data)`
`Object` | `visit(ASTCall node, Object data)`
`Object` | `visit(ASTCflowBelow node, Object data)`
`Object` | `visit(ASTCflow node, Object data)`
`Object` | `visit(ASTClassPattern node, Object data)`
`Object` | `visit(ASTConstructorPattern node, Object data)`
`Object` | `visit(ASTExecution node, Object data)`
`Object` | `visit(ASTExpression node, Object data)`
`Object` | `visit(ASTFieldPattern node, Object data)`
`Object` | `visit(ASTGet node, Object data)`
`Object` | `visit(ASTHandler node, Object data)`
`Object` | `visit(ASTHasField node, Object data)`
`Object` | `visit(ASTHasMethod node, Object data)`
`Object` | `visit(ASTMethodPattern node, Object data)`
`Object` | `visit(ASTModifier node, Object data)`
`Object` | `visit(ASTNot node, Object data)`
`Object` | `visit(ASTOr node, Object data)`
`Object` | `visit(ASTParameter node, Object data)`
`Object` | `visit(ASTPointcutReference node, Object data)`
`Object` | `visit(ASTRoot node, Object data)`
`Object` | `visit(ASTSet node, Object data)`
`Object` | `visit(ASTStaticInitialization node, Object data)`
`Object` | `visit(ASTTarget node, Object data)`
`Object` | `visit(ASTThis node, Object data)`
`Object` | `visit(ASTWithinCode node, Object data)`
`Object` | `visit(ASTWithin node, Object data)`
`Object` | `visit(Node node, Object data)`
`Object` | `visit(SimpleNode node, Object data)`
`protected Object` | `visitAnnotatedNode(SimpleNode node, ReflectionInfo reflectInfo)` Test the context upon the expression tree, under a node that can contain annotations.
`protected boolean` | `visitAttributes(SimpleNode node, ReflectionInfo refInfo)`
`protected boolean` | `visitModifiers(SimpleNode node, ReflectionInfo refInfo)`
`protected boolean` | `visitParameters(SimpleNode node, ClassInfo[] parameterTypes)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### m_root

    protected Node m_root

### m_expression

    protected String m_expression

### m_namespace

    protected String m_namespace

### m_expressionInfo

    protected ExpressionInfo m_expressionInfo

  The expressionInfo this visitor is built on

Constructor Detail

### ExpressionVisitor

    public ExpressionVisitor(ExpressionInfo expressionInfo,
                             String expression,
                             String namespace,
                             Node root)

  Creates a new expression.

  Parameters:
    `expressionInfo` - the expressionInfo this visitor is built on for expression with signature
    `expression` - the expression as a string
    `namespace` - the namespace
    `root` - the AST root

Method Detail

### match

    public boolean match(ExpressionContext context)

  Matches the expression context. If undetermined, assume true. Do not use for poincut reference - see matchUndeterministic

  Parameters:
    `context` -
  Returns:

### matchUndeterministic

    protected Boolean matchUndeterministic(ExpressionContext context)

### visit

    public Object visit(Node node,
                        Object data)

### visit

    public Object visit(SimpleNode node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTRoot node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTExpression node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTOr node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTAnd node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTNot node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTPointcutReference node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTExecution node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTCall node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTSet node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTGet node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTHandler node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTStaticInitialization node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTWithin node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTWithinCode node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTHasMethod node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTHasField node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTTarget node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTThis node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTCflow node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTCflowBelow node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTClassPattern node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTMethodPattern node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTConstructorPattern node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTFieldPattern node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTParameter node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTArgs node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTArgParameter node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTAttribute node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visit

    public Object visit(ASTModifier node,
                        Object data)

  Specified by:
    `visit` in interface `ExpressionParserVisitor`

### visitAttributes

    protected boolean visitAttributes(SimpleNode node,
                                      ReflectionInfo refInfo)

### visitModifiers

    protected boolean visitModifiers(SimpleNode node,
                                     ReflectionInfo refInfo)

### visitParameters

    protected boolean visitParameters(SimpleNode node,
                                      ClassInfo[] parameterTypes)

### toString

    public String toString()

  Returns the string representation of the expression.

  Overrides:
    `toString` in class `Object`
  Returns:

### visitAnnotatedNode

    protected Object visitAnnotatedNode(SimpleNode node,
                                        ReflectionInfo reflectInfo)

  Test the context upon the expression tree, under a node that can contain annotations.

  Parameters:
    `node` - root node of the annotation expression
    `reflectInfo` - context reflection info
  Returns:
    `Boolean.TRUE` in case the `reflectInfo` match the expression subtree, `Boolean.FALSE` otherwise.

### getASTRoot

    public Node getASTRoot()

  Access the ASTRoot we visit

  Returns:

### getExpressionInfo

    public ExpressionInfo getExpressionInfo()

  Access the ExpressionInfo we are build on

  Returns:

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2005 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.