org.objectweb.jac.core
Class Pointcut

java.lang.Object
  |
  +--org.objectweb.jac.core.Pointcut
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MethodPointcut

public abstract class Pointcut
extends Object
implements Serializable

This abstract class is the definition of a pointcut in org.objectweb.jac.

Author:
Renaud Pawlak
See Also:
AspectComponent, MethodPointcut, Serialized Form

Constructor Summary
Pointcut()
           
 
Method Summary
abstract  void applyTo(Wrappee wrappee, ClassItem cl)
          Applies this pointcut to the given wrappee.
protected  void parseExpr(String descr, Wrappee wrappee, ClassItem cl, String expr, String[] keywords, Vector result, Vector inv)
          A generic method that parses a pointcut expression and stores the result within a vector.
protected abstract  String parseKeyword(Wrappee wrappee, ClassItem cl, String keywordExpr, List parameters)
          Parses a keyword expression and returns its actual value as a regular expression regarding the context.
protected  List replaceTags(List parameters, ClassItem cli)
          Replace elements of parameters "" with members who have this attribute, and "member_name" with the member having that name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pointcut

public Pointcut()
Method Detail

applyTo

public abstract void applyTo(Wrappee wrappee,
                             ClassItem cl)
Applies this pointcut to the given wrappee.

Parameters:
wrappee - the component the current pointcut is applied to

parseKeyword

protected abstract String parseKeyword(Wrappee wrappee,
                                       ClassItem cl,
                                       String keywordExpr,
                                       List parameters)
Parses a keyword expression and returns its actual value as a regular expression regarding the context.


replaceTags

protected List replaceTags(List parameters,
                           ClassItem cli)
Replace elements of parameters "" with members who have this attribute, and "member_name" with the member having that name.

Parameters:
parameters - Strings to replace
cli - replace with members of this class
Returns:
substituted list of MemberItem

parseExpr

protected void parseExpr(String descr,
                         Wrappee wrappee,
                         ClassItem cl,
                         String expr,
                         String[] keywords,
                         Vector result,
                         Vector inv)
A generic method that parses a pointcut expression and stores the result within a vector.

Parameters:
descr - a humain readable desciption of the pointcut expression type (used to make logs clearer)
expr - a pointcut expression
result - the parsing result
inv - filled with Boolean, one per element in result