org.codehaus.aspectwerkz.definition.expression
Class LeafExpression

java.lang.Object
  extended byorg.codehaus.aspectwerkz.definition.expression.Expression
      extended byorg.codehaus.aspectwerkz.definition.expression.LeafExpression
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CallExpression, CflowExpression, ClassExpression, ExecutionExpression, GetExpression, SetExpression, ThrowsExpression

public abstract class LeafExpression
extends Expression

Base class for leaf expression (pattern)

Author:
Alexandre Vasseur
See Also:
Serialized Form

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 isHierarchical()
          Checks if the expression is hierachical.
 boolean isHierarchicalCallee()
          Checks if the expression is hierachical on Callee side.
 boolean match(ClassMetaData classMetaData)
          Match class pattern only
 boolean match(ClassMetaData classMetaData, MemberMetaData memberMetaData, java.lang.String exceptionType)
          Checks if the expression matches a certain join point.
 boolean matchInOrNotIn(ClassMetaData classMetaData)
          Match one part appearing in IN / NOT IN sub-expression Makes sense only with CallExpression
 boolean matchInOrNotIn(ClassMetaData classMetaData, MemberMetaData memberMetaData)
          Match one part appearing in IN / NOT IN sub-expression Makes sense only with CallExpression
 
Methods inherited from class org.codehaus.aspectwerkz.definition.expression.Expression
getExpression, getName, getNamespace, getType, match, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

isHierarchical

public boolean isHierarchical()
Checks if the expression is hierachical.

Returns:
boolean

isHierarchicalCallee

public boolean isHierarchicalCallee()
Checks if the expression is hierachical on Callee side.

Returns:
boolean

match

public boolean match(ClassMetaData classMetaData)
Match class pattern only

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

matchInOrNotIn

public boolean matchInOrNotIn(ClassMetaData classMetaData)
Match one part appearing in IN / NOT IN sub-expression Makes sense only with CallExpression

Specified by:
matchInOrNotIn in class Expression
Parameters:
classMetaData -
Returns:
true if match

matchInOrNotIn

public boolean matchInOrNotIn(ClassMetaData classMetaData,
                              MemberMetaData memberMetaData)
Match one part appearing in IN / NOT IN sub-expression Makes sense only with CallExpression

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

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. Overrided by ThrowsExpression

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

getCflowExpressions

public java.util.Map getCflowExpressions()
Description copied from class: Expression
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.