abc.weaving.aspectinfo
Class CflowSetup

java.lang.Object
  extended by abc.weaving.aspectinfo.Syntax
      extended by abc.weaving.aspectinfo.AbstractAdviceDecl
          extended by abc.weaving.aspectinfo.CflowSetup
All Implemented Interfaces:
java.lang.Cloneable

public class CflowSetup
extends AbstractAdviceDecl

Manufactured advice that is responsible for setting up cflow stacks/counters

Author:
Ganesh Sittampalam, Damien Sereni, Ondrej Lhotak

Nested Class Summary
 class CflowSetup.CflowBoundVars
           
static class CflowSetup.CflowSetupBound
           
static class CflowSetup.CflowSetupWeavingContext
           
 
Field Summary
 java.util.Map popStmts
           
 java.util.Map pushStmts
           
 
Fields inherited from class abc.weaving.aspectinfo.AbstractAdviceDecl
pc, spec
 
Method Summary
 void addUse(CflowPointcut pc)
           
 void clearUses()
           
 CflowCodeGenUtils.CflowCodeGen codeGen()
           
static CflowSetup construct(Aspect aspct, Pointcut pc, boolean isBelow, java.util.Hashtable typeMap, Position pos, int depth)
           
 void debugInfo(java.lang.String prefix, java.lang.StringBuffer sb)
           
 java.util.List getActuals()
           
 SootFieldRef getCflowStack()
           
 int getDepth()
           
 Local getMethodCflowLocal(LocalGeneratorEx localgen, SootMethod m)
           
 Local getMethodCflowThreadLocal(LocalGeneratorEx localgen, SootMethod m)
           
static int getPrecedence(CflowSetup a, CflowSetup b)
           
 java.util.List getUses()
           
 WeavingEnv getWeavingEnv()
           
 boolean isBelow()
           
 boolean isUsed()
           
 Chain makeAdviceExecutionStmts(AdviceApplication adviceappl, LocalGeneratorEx localgen, WeavingContext wc)
          Produce a chain containing the statements to execute this piece of advice.
 WeavingContext makeWeavingContext()
           
 void removeUse(CflowPointcut pc)
           
 void resetForReweaving()
           
 java.lang.String toString()
           
 
Methods inherited from class abc.weaving.aspectinfo.AbstractAdviceDecl
clone, errorInfo, getAdviceSpec, getApplCount, getAspect, getDefiningAspect, getFormals, getPointcut, getPrecedence, hasEnclosingJoinPoint, hasJoinPoint, hasJoinPointStaticPart, incrApplCount, makeCopyInAspect, postResidue, preprocess, preResidue, reportMessages
 
Methods inherited from class abc.weaving.aspectinfo.Syntax
getPosition
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

popStmts

public java.util.Map popStmts

pushStmts

public java.util.Map pushStmts
Method Detail

construct

public static CflowSetup construct(Aspect aspct,
                                   Pointcut pc,
                                   boolean isBelow,
                                   java.util.Hashtable typeMap,
                                   Position pos,
                                   int depth)

codeGen

public CflowCodeGenUtils.CflowCodeGen codeGen()

isBelow

public boolean isBelow()

getDepth

public int getDepth()

getActuals

public java.util.List getActuals()

debugInfo

public void debugInfo(java.lang.String prefix,
                      java.lang.StringBuffer sb)
Specified by:
debugInfo in class AbstractAdviceDecl

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getWeavingEnv

public WeavingEnv getWeavingEnv()
Specified by:
getWeavingEnv in class AbstractAdviceDecl

makeWeavingContext

public WeavingContext makeWeavingContext()
Specified by:
makeWeavingContext in class AbstractAdviceDecl

resetForReweaving

public void resetForReweaving()
Overrides:
resetForReweaving in class AbstractAdviceDecl

getCflowStack

public SootFieldRef getCflowStack()

getMethodCflowLocal

public Local getMethodCflowLocal(LocalGeneratorEx localgen,
                                 SootMethod m)

getMethodCflowThreadLocal

public Local getMethodCflowThreadLocal(LocalGeneratorEx localgen,
                                       SootMethod m)

makeAdviceExecutionStmts

public Chain makeAdviceExecutionStmts(AdviceApplication adviceappl,
                                      LocalGeneratorEx localgen,
                                      WeavingContext wc)
Description copied from class: AbstractAdviceDecl
Produce a chain containing the statements to execute this piece of advice. If execution reaches the beginning of the chain, then the advice definitely applies.

Specified by:
makeAdviceExecutionStmts in class AbstractAdviceDecl
Parameters:
adviceappl - The advice application structure.
localgen - A local variable generator for the method body being woven into
wc - The weaving context

getPrecedence

public static int getPrecedence(CflowSetup a,
                                CflowSetup b)

isUsed

public boolean isUsed()

clearUses

public void clearUses()

addUse

public void addUse(CflowPointcut pc)

removeUse

public void removeUse(CflowPointcut pc)

getUses

public java.util.List getUses()