abc.weaving.aspectinfo
Class ShadowPointcut

java.lang.Object
  extended by abc.weaving.aspectinfo.Syntax
      extended by abc.weaving.aspectinfo.Pointcut
          extended by abc.weaving.aspectinfo.ShadowPointcut
Direct Known Subclasses:
Cast, ClassInitialization, ConstructorCall, Execution, GetField, Handler, InterfaceInitialization, MethodCall, Preinitialization, SetField, Throw

public abstract class ShadowPointcut
extends Pointcut

A pointcut designator representing a set of joinpoint shadows at which the pointcut will match.

Author:
Aske Simon Christensen, Ganesh Sittampalam

Nested Class Summary
 
Nested classes/interfaces inherited from class abc.weaving.aspectinfo.Pointcut
Pointcut.DNF
 
Constructor Summary
ShadowPointcut(Position pos)
           
 
Method Summary
 void getFreeVars(java.util.Set result)
          Get a list of free variables bound by this pointcut
protected  Pointcut inline(java.util.Hashtable renameEnv, java.util.Hashtable typeEnv, Aspect context, int cflowdepth)
          Inlining should remove all PointcutRefs, and return a pointcut that is alpha-renamed
protected abstract  Residue matchesAt(ShadowMatch sm)
          Shadow pointcuts just need to know the ShadowMatch
 Residue matchesAt(WeavingEnv env, SootClass cls, SootMethod method, ShadowMatch sm)
          Given a context and weaving environment, produce a residue
 void registerSetupAdvice(Aspect aspct, java.util.Hashtable typeMap)
          If any synthetic advice is required to implement this pointcut, this method should take care of adding it.
 
Methods inherited from class abc.weaving.aspectinfo.Pointcut
dnf, freshVar, normalize, toString, unify
 
Methods inherited from class abc.weaving.aspectinfo.Syntax
getPosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShadowPointcut

public ShadowPointcut(Position pos)
Method Detail

matchesAt

public final Residue matchesAt(WeavingEnv env,
                               SootClass cls,
                               SootMethod method,
                               ShadowMatch sm)
Description copied from class: Pointcut
Given a context and weaving environment, produce a residue

Specified by:
matchesAt in class Pointcut

matchesAt

protected abstract Residue matchesAt(ShadowMatch sm)
Shadow pointcuts just need to know the ShadowMatch


inline

protected Pointcut inline(java.util.Hashtable renameEnv,
                          java.util.Hashtable typeEnv,
                          Aspect context,
                          int cflowdepth)
Description copied from class: Pointcut
Inlining should remove all PointcutRefs, and return a pointcut that is alpha-renamed

Specified by:
inline in class Pointcut
Parameters:
renameEnv - A mapping from pointcut names to the Vars they should be renamed to. If a name isn't in the map, it doesn't need to be renamed.
typeEnv - A mapping from pointcut names to AbcTypes. Every variable that can appear free in the pointcut must be listed. The names are those before any renaming takes place.
context - The Aspect in which the root pointcut is defined. This is required because references to abstract pointcuts must be resolved to the concrete pointcut using this aspect.
cflowdepth - The number of surrounding cflows. This is required to determine the correct precedence for the synthetic advice used to implement cflow.
Returns:
The inlined pointcut

registerSetupAdvice

public void registerSetupAdvice(Aspect aspct,
                                java.util.Hashtable typeMap)
Description copied from class: Pointcut
If any synthetic advice is required to implement this pointcut, this method should take care of adding it.

Specified by:
registerSetupAdvice in class Pointcut
Parameters:
aspct - The aspect in which the pointcut is defined
typeMap - A mapping from formal name to AbcType for all the formal parameters to the pointcut

getFreeVars

public void getFreeVars(java.util.Set result)
Description copied from class: Pointcut
Get a list of free variables bound by this pointcut

Specified by:
getFreeVars in class Pointcut
Parameters:
result - The results should be placed in this set (having it as a parameter allows it to be built up incrementally, which is more efficient than repeatedly taking the union of sets)