abc.weaving.matching
Class StmtShadowMatch

java.lang.Object
  extended by abc.weaving.matching.ShadowMatch
      extended by abc.weaving.matching.StmtShadowMatch
Direct Known Subclasses:
CastShadowMatch, ConstructorCallShadowMatch, GetFieldShadowMatch, HandlerShadowMatch, MethodCallShadowMatch, SetFieldShadowMatch, ThrowShadowMatch

public abstract class StmtShadowMatch
extends ShadowMatch

A base class for join point shadows that apply to a single statement (or pair of statements in the case of constructor calls)

Author:
Ganesh Sittampalam

Field Summary
protected  Stmt stmt
           
 
Fields inherited from class abc.weaving.matching.ShadowMatch
container, sp
 
Constructor Summary
protected StmtShadowMatch(SootMethod container, Stmt stmt)
           
 
Method Summary
protected  AdviceApplication doAddAdviceApplication(MethodAdviceList mal, AbstractAdviceDecl ad, Residue residue)
           
 ShadowMatch getEnclosing()
          return the enclosing ShadowMatch
 Host getHost()
          Get the host that this ShadowMatch corresponds to, for positional information
 Stmt getStmt()
           
 ContextValue getThisContextValue()
          Return a ContextValue that represents the runtime value that is bound by a this() pointcut
static void makeArgumentsUniqueLocals(SootMethod method, Stmt stmt)
          Lazily replaces the arguments of the invokeExpr of stmt with unique locals and inserts assignment statements before stmt, assigning the original values to the locals.
static void reset()
           
 
Methods inherited from class abc.weaving.matching.ShadowMatch
addAdviceApplication, addIfNecessary, getArgsContextValues, getContainer, getExceptions, getReturningContextValue, getSJPInfo, getTargetContextValue, inline, joinpointName, makeSJPInfo, recordSJPInfo, setShadowPoints, supportsAfter, supportsAround, supportsBefore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stmt

protected Stmt stmt
Constructor Detail

StmtShadowMatch

protected StmtShadowMatch(SootMethod container,
                          Stmt stmt)
Method Detail

getHost

public Host getHost()
Description copied from class: ShadowMatch
Get the host that this ShadowMatch corresponds to, for positional information

Specified by:
getHost in class ShadowMatch

doAddAdviceApplication

protected AdviceApplication doAddAdviceApplication(MethodAdviceList mal,
                                                   AbstractAdviceDecl ad,
                                                   Residue residue)
Specified by:
doAddAdviceApplication in class ShadowMatch

getStmt

public Stmt getStmt()

getEnclosing

public ShadowMatch getEnclosing()
Description copied from class: ShadowMatch
return the enclosing ShadowMatch

Specified by:
getEnclosing in class ShadowMatch

getThisContextValue

public ContextValue getThisContextValue()
Description copied from class: ShadowMatch
Return a ContextValue that represents the runtime value that is bound by a this() pointcut

Overrides:
getThisContextValue in class ShadowMatch

makeArgumentsUniqueLocals

public static void makeArgumentsUniqueLocals(SootMethod method,
                                             Stmt stmt)
Lazily replaces the arguments of the invokeExpr of stmt with unique locals and inserts assignment statements before stmt, assigning the original values to the locals. Needed for around().

Parameters:
method -
stmt -

reset

public static void reset()