|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectabc.weaving.aspectinfo.Syntax
abc.weaving.aspectinfo.Pointcut
abc.weaving.aspectinfo.LocalPointcutVars
public class LocalPointcutVars
Declare local pointcut variables. These can appear after inlining
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class abc.weaving.aspectinfo.Pointcut |
|---|
Pointcut.DNF |
| Constructor Summary | |
|---|---|
LocalPointcutVars(Pointcut pc,
java.util.List formals,
Position pos)
|
|
| Method Summary | |
|---|---|
protected Pointcut.DNF |
dnf()
Return the DNF form of this pointcut. |
java.util.List |
getFormals()
|
void |
getFreeVars(java.util.Set result)
Get a list of free variables bound by this pointcut |
Pointcut |
getPointcut()
|
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 |
Residue |
matchesAt(WeavingEnv we,
SootClass cls,
SootMethod method,
ShadowMatch sm)
Given a context and weaving environment, produce a residue |
void |
registerSetupAdvice(Aspect context,
java.util.Hashtable typeMap)
If any synthetic advice is required to implement this pointcut, this method should take care of adding it. |
java.lang.String |
toString()
Subclasses must define toString, for debugging purposes |
boolean |
unify(Pointcut otherpc,
Unification unification)
Attempt to unify two pointcuts. pc.unify(pc', unification) should return true if the pointcuts can be unified, and set the renamings appropriately in unification. |
static boolean |
unifyLocals(Pointcut sourcepc,
Pointcut destpc,
Unification unification)
|
| Methods inherited from class abc.weaving.aspectinfo.Pointcut |
|---|
freshVar, normalize |
| 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 |
|---|
public LocalPointcutVars(Pointcut pc,
java.util.List formals,
Position pos)
| Method Detail |
|---|
public Pointcut getPointcut()
public java.util.List getFormals()
public Residue matchesAt(WeavingEnv we,
SootClass cls,
SootMethod method,
ShadowMatch sm)
throws SemanticException
Pointcut
matchesAt in class PointcutSemanticException
protected Pointcut inline(java.util.Hashtable renameEnv,
java.util.Hashtable typeEnv,
Aspect context,
int cflowdepth)
Pointcut
inline in class PointcutrenameEnv - 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.
protected Pointcut.DNF dnf()
Pointcut
dnf in class Pointcutpublic java.lang.String toString()
Pointcut
toString in class Pointcut
public void registerSetupAdvice(Aspect context,
java.util.Hashtable typeMap)
Pointcut
registerSetupAdvice in class Pointcutcontext - The aspect in which the pointcut is definedtypeMap - A mapping from formal name to AbcType for
all the formal parameters to the pointcutpublic void getFreeVars(java.util.Set result)
Pointcut
getFreeVars in class Pointcutresult - 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)
public boolean unify(Pointcut otherpc,
Unification unification)
PointcutA default implementation is provided, but all subclasses should override this - otherwise cflow CSE will be disabled for cflow that use these pointcuts.
Typical implementations for pointcuts that introduce no free variables are straightforward (see the And pointcut, for example). For pointcuts that introduce free variables, the Var.unify method is used to actually update the renamings (see the Args pointcut).
unify in class Pointcutotherpc - the pointcut that should be unify with thisunification - the Unification that should be set.
AndPointcut.unify example,
Var.unify,
Unification
public static boolean unifyLocals(Pointcut sourcepc,
Pointcut destpc,
Unification unification)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||