abc.weaving.matching
Class AdviceApplication

java.lang.Object
  extended by abc.weaving.matching.AdviceApplication
Direct Known Subclasses:
ConstructorAdviceApplication, ExecutionAdviceApplication, HandlerAdviceApplication, NewStmtAdviceApplication, StmtAdviceApplication

public abstract class AdviceApplication
extends java.lang.Object

The data structure the pointcut matcher computes. One of these is constructed for each piece of advice at each shadow where it might apply.

Author:
Ganesh Sittampalam, Ondrej Lhotak

Field Summary
 AbstractAdviceDecl advice
          The advice to be applied.
 ShadowMatch shadowmatch
           
 
Constructor Summary
AdviceApplication(AbstractAdviceDecl advice, Residue residue)
           
 
Method Summary
static java.util.Hashtable computeAdviceLists(GlobalAspectInfo info)
          Construct a hash table mapping each concrete soot.SootMethod in each weaveable class to a MethodAdviceList for that method.
 void debugInfo(java.lang.String prefix, java.lang.StringBuffer sb)
          Add some information about the advice application to a string buffer, starting each line with the given prefix
static void doShadows(GlobalAspectInfo info, MethodAdviceList mal, SootClass cls, SootMethod method, MethodPosition pos)
           
 Residue getResidue()
           
 java.util.List getResidueBoxes()
           
abstract  AdviceApplication inline(ConstructorInliningMap cim)
          Create a new AdviceApplication that's just like this one, but applies to an inlined version of the code.
 void reportMessages()
          Report any errors or warnings for this advice application.
 void setResidue(Residue r)
           
 void setShadowMatch(ShadowMatch sm)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

advice

public AbstractAdviceDecl advice
The advice to be applied.


shadowmatch

public ShadowMatch shadowmatch
Constructor Detail

AdviceApplication

public AdviceApplication(AbstractAdviceDecl advice,
                         Residue residue)
Method Detail

getResidue

public Residue getResidue()

setResidue

public void setResidue(Residue r)

getResidueBoxes

public java.util.List getResidueBoxes()

setShadowMatch

public final void setShadowMatch(ShadowMatch sm)

debugInfo

public void debugInfo(java.lang.String prefix,
                      java.lang.StringBuffer sb)
Add some information about the advice application to a string buffer, starting each line with the given prefix


doShadows

public static void doShadows(GlobalAspectInfo info,
                             MethodAdviceList mal,
                             SootClass cls,
                             SootMethod method,
                             MethodPosition pos)
                      throws SemanticException
Throws:
SemanticException

computeAdviceLists

public static java.util.Hashtable computeAdviceLists(GlobalAspectInfo info)
                                              throws SemanticException
Construct a hash table mapping each concrete soot.SootMethod in each weaveable class to a MethodAdviceList for that method.

Throws:
SemanticException

reportMessages

public void reportMessages()
Report any errors or warnings for this advice application.


inline

public abstract AdviceApplication inline(ConstructorInliningMap cim)
Create a new AdviceApplication that's just like this one, but applies to an inlined version of the code.