abc.weaving.aspectinfo
Class AdviceDecl
java.lang.Object
abc.weaving.aspectinfo.Syntax
abc.weaving.aspectinfo.AbstractAdviceDecl
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
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 java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AdviceDecl
public AdviceDecl(AdviceSpec spec,
Pointcut pc,
MethodSig impl,
Aspect aspct,
int jp,
int jpsp,
int ejp,
java.util.List methods,
Position pos)
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 intowc
- 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()