org.codehaus.aspectwerkz.definition.expression
Class ExpressionExpression

java.lang.Object
  extended byorg.codehaus.aspectwerkz.definition.expression.Expression
      extended byorg.codehaus.aspectwerkz.definition.expression.ExpressionExpression
All Implemented Interfaces:
java.io.Serializable

public class ExpressionExpression
extends Expression

Class for sub-expression

Author:
Alexandre Vasseur
See Also:
Serialized Form

Constructor Summary
ExpressionExpression(ExpressionNamespace namespace, java.lang.String expression)
          Create an anonymous expression
ExpressionExpression(ExpressionNamespace namespace, java.lang.String expression, java.lang.String name)
          Create a named expression (for expression nesting)
 
Method Summary
 java.util.Map getCflowExpressions()
          Return a Map(name->Expression) of expression involved in the IN and NOT IN sub-expression of this Expression (can be empty)
 boolean match(ClassMetaData classMetaData)
          Checks if the expression matches a certain join point.
 boolean match(ClassMetaData classMetaData, MemberMetaData memberMetaData)
          Checks if the expression matches a certain join point.
 boolean match(ClassMetaData classMetaData, MemberMetaData memberMetaData, java.lang.String exceptionType)
          Checks if the expression matches a certain join point.
 boolean matchInOrNotIn(ClassMetaData classMetaData)
          Checks if the expression matches a certain join point as regards the IN and NOT IN parts if any.
 boolean matchInOrNotIn(ClassMetaData classMetaData, MemberMetaData memberMetaData)
          Checks if the expression matches a certain join point as regards IN / NOT IN parts Each IN / NOT IN part is evaluated independantly from the boolean algebra (TF time)
 
Methods inherited from class org.codehaus.aspectwerkz.definition.expression.Expression
getExpression, getName, getNamespace, getType, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExpressionExpression

public ExpressionExpression(ExpressionNamespace namespace,
                            java.lang.String expression)
Create an anonymous expression

Parameters:
namespace -
expression -

ExpressionExpression

public ExpressionExpression(ExpressionNamespace namespace,
                            java.lang.String expression,
                            java.lang.String name)
Create a named expression (for expression nesting)

Parameters:
namespace -
expression -
name -
Method Detail

match

public boolean match(ClassMetaData classMetaData)
Description copied from class: Expression
Checks if the expression matches a certain join point.

Only checks for a class match to allow early filtering.

Only does a qualified guess, does not evaluate the whole expression since doing it only on class level would give the false results.

Specified by:
match in class Expression
Parameters:
classMetaData - the class meta-data
Returns:
boolean

matchInOrNotIn

public boolean matchInOrNotIn(ClassMetaData classMetaData)
Checks if the expression matches a certain join point as regards the IN and NOT IN parts if any. Each IN / NOT IN part is evaluated independantly from the boolean algebra (TF time)

Only checks for a class match to allow early filtering.

Only does a qualified guess, does not evaluate the whole expression since doing it only on class level would give the false results.

Specified by:
matchInOrNotIn in class Expression
Parameters:
classMetaData - the class meta-data
Returns:
boolean

matchInOrNotIn

public boolean matchInOrNotIn(ClassMetaData classMetaData,
                              MemberMetaData memberMetaData)
Checks if the expression matches a certain join point as regards IN / NOT IN parts Each IN / NOT IN part is evaluated independantly from the boolean algebra (TF time)

Specified by:
matchInOrNotIn in class Expression
Parameters:
classMetaData - the class meta-data
memberMetaData - the meta-data for the member
Returns:
boolean

match

public boolean match(ClassMetaData classMetaData,
                     MemberMetaData memberMetaData,
                     java.lang.String exceptionType)
Checks if the expression matches a certain join point.

Special case in the API which tries to match exception types as well.

Specified by:
match in class Expression
Parameters:
classMetaData - the class meta-data
memberMetaData - the meta-data for the member
exceptionType - the exception type (null => match all)
Returns:
boolean

match

public boolean match(ClassMetaData classMetaData,
                     MemberMetaData memberMetaData)
Checks if the expression matches a certain join point.

Specified by:
match in class Expression
Parameters:
classMetaData - the class meta-data
memberMetaData - the meta-data for the member
Returns:
boolean

getCflowExpressions

public java.util.Map getCflowExpressions()
Return a Map(name->Expression) of expression involved in the IN and NOT IN sub-expression of this Expression (can be empty)

Specified by:
getCflowExpressions in class Expression
Returns:
Map(name->Expression)


Copyright (c) 2002-2004 The AspectWerkz Team. All Rights Reserved.