abc.weaving.aspectinfo
Class ArgVar
java.lang.Object
abc.weaving.aspectinfo.Syntax
abc.weaving.aspectinfo.ArgPattern
abc.weaving.aspectinfo.ArgAny
abc.weaving.aspectinfo.ArgVar
public class ArgVar
- extends ArgAny
An argument pattern denoting a pointcut variable.
- Author:
- Aske Simon Christensen, Ganesh Sittampalam, Damien Sereni
Constructor Summary |
ArgVar(Var var,
Position pos)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ArgVar
public ArgVar(Var var,
Position pos)
getVar
public Var getVar()
toString
public java.lang.String toString()
- Overrides:
toString
in class ArgAny
matchesAt
public Residue matchesAt(WeavingEnv we,
ContextValue cv)
- Description copied from class:
ArgPattern
- For use when being used in an args pattern
- Overrides:
matchesAt
in class ArgAny
substituteForPointcutFormal
public Var substituteForPointcutFormal(java.util.Hashtable renameEnv,
java.util.Hashtable typeEnv,
Formal formal,
java.util.List newLocals,
java.util.List newCasts,
Position pos)
- Description copied from class:
ArgPattern
- For use when this is being used as a pointcut formal
- Overrides:
substituteForPointcutFormal
in class ArgAny
getFreeVars
public void getFreeVars(java.util.Set result)
- Overrides:
getFreeVars
in class ArgAny
unify
public boolean unify(ArgPattern other,
Unification unification)
- Description copied from class:
ArgPattern
- Attempts to unify two pointcuts, creating another pointcut that has enough variables
to encompass both if possible. Variables are only unified if they have the same type,
as stored in the unification typemaps. If unification.unifyWithFirst(), then restricted
unification is attempted, which succeeds only if both pointcuts can be unified with result
the first pointcut (ie the first pointcut has no less free variables than the second).
- Overrides:
unify
in class ArgAny
- Parameters:
other
- The other pointcut to unify withunification
- The unification. This should be initialized (determining
whether we attempt proper or restricted unification) and the typemaps should
be set.
- Returns:
- True iff the unification was successful. In this case, unification contains
the resulting pointcut and the substitutions taking it to THIS and OTHER. Otherwise,
unification is left in any old state.