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 ExpressionInfo

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

    public class ExpressionInfo

extends Object

Abstraction that holds info about the expression and the different visitors.
We are using a lazy initialization for m_hasCflowPointcut field to allow to fully resolve each expression (that is f.e. on IBM compiler, fields are in the reverse order, thus pointcut reference in aspect defined with annotations may not be resolved until the whole class has been parsed.

Author:
  Jonas Bonr , Alexandre Vasseur

Field Summary
`static String` | `JOINPOINT_ABBREVIATION`
`static String` | `JOINPOINT_CLASS_NAME`
`static String` | `RTTI_ABBREVIATION`
`static String` | `STATIC_JOINPOINT_ABBREVIATION`
`static String` | `STATIC_JOINPOINT_CLASS_NAME`

Constructor Summary
`ExpressionInfo(Node subExpression, String namespace)` Creates a new expression info from an already parsed node This is usefull when extracting cflow sub expressions.
`ExpressionInfo(String expression, String namespace)` Creates a new expression info instance from its string representation

Method Summary
`void` | `addArgument(String name, String className, ClassLoader loader)` Add an argument extracted from the call signature of the expression info.
`AdvisedClassFilterExpressionVisitor` | `getAdvisedClassFilterExpression()` Returns the advised class filter expression.
`int` | `getArgumentIndex(String parameterName)` Returns the argument index.
`String` | `getArgumentNameAtIndex(int index)` Returns the argument at the given index.
`Set` | `getArgumentNames()` Returns all argument names.
`String` | `getArgumentType(String parameterName)` Returns the argumen type.
`CflowAspectExpressionVisitor` | `getCflowAspectExpression()` Returns the cflow aspect expression.
`ExpressionVisitor` | `getExpression()` Returns the regular expression.
`String` | `getNamespace()` Returns the namespace
`static ExpressionParser` | `getParser()` Returns the parser.
`String` | `getSpecialArgumentName()` Get the bounded name of the special argument for afterReturning/Throwing binding
`void` | `inheritPossibleArgumentFrom(ExpressionInfo expressionInfo)`
`void` | `setSpecialArgumentName(String specialArgumentName)` Set the bounded name of the special argument for afterReturning/Throwing binding
`String` | `toString()` Returns the expression as string.

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

Field Detail

### JOINPOINT_CLASS_NAME

    public static final String JOINPOINT_CLASS_NAME

### STATIC_JOINPOINT_CLASS_NAME

    public static final String STATIC_JOINPOINT_CLASS_NAME

### JOINPOINT_ABBREVIATION

    public static final String JOINPOINT_ABBREVIATION

See Also:
  Constant Field Values

### STATIC_JOINPOINT_ABBREVIATION

    public static final String STATIC_JOINPOINT_ABBREVIATION

See Also:
  Constant Field Values

### RTTI_ABBREVIATION

    public static final String RTTI_ABBREVIATION

See Also:
  Constant Field Values

Constructor Detail

### ExpressionInfo

    public ExpressionInfo(String expression,
                          String namespace)

  Creates a new expression info instance from its string representation

  Parameters:
    `expression` - the expression
    `namespace` - the namespace

### ExpressionInfo

    public ExpressionInfo(Node subExpression,
                          String namespace)

  Creates a new expression info from an already parsed node This is usefull when extracting cflow sub expressions. Some attached visitor will be wrong since the string representation of the expression is not available.

  Parameters:
    `subExpression` - the sub expression node
    `namespace` - the namespace

Method Detail

### getExpression

    public ExpressionVisitor getExpression()

  Returns the regular expression.

  Returns:
    the regular expression

### getNamespace

    public String getNamespace()

  Returns the namespace

  Returns:

### getCflowAspectExpression

    public CflowAspectExpressionVisitor getCflowAspectExpression()

  Returns the cflow aspect expression.

  Returns:
    the cflow aspect expression

### getAdvisedClassFilterExpression

    public AdvisedClassFilterExpressionVisitor getAdvisedClassFilterExpression()

  Returns the advised class filter expression.

  Returns:
    the advised class filter expression

### getParser

    public static ExpressionParser getParser()

  Returns the parser.

  Returns:
    the parser

### toString

    public String toString()

  Returns the expression as string.

  Overrides:
    `toString` in class `Object`
  Returns:
    the expression as string

### addArgument

    public void addArgument(String name,
                            String className,
                            ClassLoader loader)

  Add an argument extracted from the call signature of the expression info. Check is made to ensure that the argument is part of an args(..) or pointcutReference(..) subexpression. Note that specialArgument for afterReturning/Throwing is handled in a different way.

  Parameters:
    `name` -
    `className` -
    `loader` -

### setSpecialArgumentName

    public void setSpecialArgumentName(String specialArgumentName)

  Set the bounded name of the special argument for afterReturning/Throwing binding

  Parameters:
    `specialArgumentName` -

### getSpecialArgumentName

    public String getSpecialArgumentName()

  Get the bounded name of the special argument for afterReturning/Throwing binding

  Returns:

### getArgumentType

    public String getArgumentType(String parameterName)

  Returns the argumen type.

  Parameters:
    `parameterName` -
  Returns:

### getArgumentIndex

    public int getArgumentIndex(String parameterName)

  Returns the argument index.

  Parameters:
    `parameterName` -
  Returns:

### getArgumentNameAtIndex

    public String getArgumentNameAtIndex(int index)

  Returns the argument at the given index.

  Parameters:
    `index` -
  Returns:
    paramName

### getArgumentNames

    public Set getArgumentNames()

  Returns all argument names.

  Returns:

### inheritPossibleArgumentFrom

    public void inheritPossibleArgumentFrom(ExpressionInfo expressionInfo)

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.