abc.weaving.residues
Class NeverMatch
java.lang.Object
abc.weaving.residues.Residue
abc.weaving.residues.NeverMatch
public class NeverMatch
- extends Residue
A "dynamic" residue that can never match.
Intended for convenience during generation and residue analysis process.
- Author:
- Ganesh Sittampalam, Ondrej Lhotak
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NeverMatch
public NeverMatch()
v
public static NeverMatch v()
optimize
public Residue optimize()
- Description copied from class:
Residue
- Optimize the residue by rebuilding it, invoking the smart
constructors along the way.
- Specified by:
optimize
in class Residue
inline
public Residue inline(ConstructorInliningMap cim)
- Description copied from class:
Residue
- Make a copy of the residue applying to an inlined version of the code.
- Specified by:
inline
in class Residue
neverMatches
public static boolean neverMatches(Residue r)
toString
public java.lang.String toString()
- Description copied from class:
Residue
- Must provide a toString method
- Specified by:
toString
in class Residue
codeGen
public Stmt codeGen(SootMethod method,
LocalGeneratorEx localgen,
Chain units,
Stmt begin,
Stmt fail,
boolean sense,
WeavingContext wc)
- Description copied from class:
Residue
- Generate the code for this dynamic residue.
- Specified by:
codeGen
in class Residue
- Parameters:
method
- The method the code is being inserted intolocalgen
- A local generator for the methodunits
- The chain the code is being inserted intobegin
- Code will be inserted just after this statementfail
- If the residue "fails", the inserted code will jump to this point;
otherwise it will fall throughsense
- If this is false, inverts the meaning of failure and success for the residuewc
- The weaving context
- Returns:
- The last statement that was inserted into the chain (or begin if nothing was).