abc.weaving.aspectinfo
Class AdviceDecl

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

public class AdviceDecl
extends AbstractAdviceDecl

A concrete advice declaration. This is used for advice declared directly in an aspect.

Author:
Aske Simon Christensen, Ganesh Sittampalam

Field Summary
 
Fields inherited from class abc.weaving.aspectinfo.AbstractAdviceDecl
pc, spec
 
Constructor Summary
AdviceDecl(AdviceSpec spec, Pointcut pc, MethodSig impl, Aspect aspct, int jp, int jpsp, int ejp, java.util.List methods, Position pos)
           
 
Method Summary
 void debugInfo(java.lang.String prefix, java.lang.StringBuffer sb)
           
 int enclosingJoinPointPos()
           
 int getFormalIndex(java.lang.String name)
           
 AbcType getFormalType(java.lang.String name)
           
 MethodSig getImpl()
          Get the signature of the placeholder method that contains the body of this advice.
 java.util.List getLocalMethods()
           
 java.util.List getLocalSootMethods()
           
static int getPrecedence(AdviceDecl a, AdviceDecl b)
           
 WeavingEnv getWeavingEnv()
           
 boolean hasEnclosingJoinPoint()
           
 boolean hasJoinPoint()
           
 boolean hasJoinPointStaticPart()
           
 int joinPointPos()
           
 int joinPointStaticPartPos()
           
 Chain makeAdviceExecutionStmts(AdviceApplication adviceappl, LocalGeneratorEx localgen, WeavingContext wc)
          create the invoke to call the advice body
 WeavingContext makeWeavingContext()
           
 int numFormals()
          return number of formals (useful for determining number of args for invokes in code generator)
 Residue postResidue(ShadowMatch sm)
           
 Residue preResidue(ShadowMatch sm)
           
 java.lang.String toString()
           
 
Methods inherited from class abc.weaving.aspectinfo.AbstractAdviceDecl
clone, errorInfo, getAdviceSpec, getApplCount, getAspect, getDefiningAspect, getFormals, getPointcut, getPrecedence, incrApplCount, makeCopyInAspect, preprocess, reportMessages, resetForReweaving
 
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
 

Constructor Detail

AdviceDecl

public AdviceDecl(AdviceSpec spec,
                  Pointcut pc,
                  MethodSig impl,
                  Aspect aspct,
                  int jp,
                  int jpsp,
                  int ejp,
                  java.util.List methods,
                  Position pos)
Method Detail

getFormalIndex

public int getFormalIndex(java.lang.String name)

getFormalType

public AbcType getFormalType(java.lang.String name)

getImpl

public MethodSig getImpl()
Get the signature of the placeholder method that contains the body of this advice.


hasJoinPoint

public boolean hasJoinPoint()
Overrides:
hasJoinPoint in class AbstractAdviceDecl

hasJoinPointStaticPart

public boolean hasJoinPointStaticPart()
Overrides:
hasJoinPointStaticPart in class AbstractAdviceDecl

hasEnclosingJoinPoint

public boolean hasEnclosingJoinPoint()
Overrides:
hasEnclosingJoinPoint in class AbstractAdviceDecl

joinPointPos

public int joinPointPos()

joinPointStaticPartPos

public int joinPointStaticPartPos()

enclosingJoinPointPos

public int enclosingJoinPointPos()

numFormals

public int numFormals()
return number of formals (useful for determining number of args for invokes in code generator)


preResidue

public Residue preResidue(ShadowMatch sm)
Overrides:
preResidue in class AbstractAdviceDecl

postResidue

public Residue postResidue(ShadowMatch sm)
Overrides:
postResidue in class AbstractAdviceDecl

makeWeavingContext

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

makeAdviceExecutionStmts

public Chain makeAdviceExecutionStmts(AdviceApplication adviceappl,
                                      LocalGeneratorEx localgen,
                                      WeavingContext wc)
create the invoke to call the advice body

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

toString

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

debugInfo

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

getWeavingEnv

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

getPrecedence

public static int getPrecedence(AdviceDecl a,
                                AdviceDecl b)

getLocalMethods

public java.util.List getLocalMethods()

getLocalSootMethods

public java.util.List getLocalSootMethods()