|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectabc.weaving.aspectinfo.Syntax
abc.weaving.aspectinfo.AbstractAdviceDecl
public abstract class AbstractAdviceDecl
The base class for any kind of 'advice' declaration This can include both real advice declared directly in the aspect and other kinds of advice needed by abc for implementation reasons.
Field Summary | |
---|---|
protected Pointcut |
pc
|
protected AdviceSpec |
spec
|
Constructor Summary | |
---|---|
protected |
AbstractAdviceDecl(Aspect aspct,
AdviceSpec spec,
Pointcut pc,
java.util.List formals,
Position pos)
|
protected |
AbstractAdviceDecl(Aspect aspct,
AdviceSpec spec,
Pointcut pc,
java.util.List formals,
Position pos,
boolean normalized)
|
Method Summary | |
---|---|
protected java.lang.Object |
clone()
|
abstract void |
debugInfo(java.lang.String prefix,
java.lang.StringBuffer sb)
|
java.lang.String |
errorInfo()
Return a string describing the current piece of advice, for use in error messages |
AdviceSpec |
getAdviceSpec()
|
int |
getApplCount()
|
Aspect |
getAspect()
Every advice declaration is associated with a particular aspect. |
Aspect |
getDefiningAspect()
Get the aspect an advice declaration was originally defined in. |
java.util.List |
getFormals()
|
Pointcut |
getPointcut()
|
static int |
getPrecedence(AbstractAdviceDecl a,
AbstractAdviceDecl b)
Get the precedence relationship between two aspects. |
abstract WeavingEnv |
getWeavingEnv()
|
boolean |
hasEnclosingJoinPoint()
|
boolean |
hasJoinPoint()
|
boolean |
hasJoinPointStaticPart()
|
int |
incrApplCount()
Increment the number of times this advice is applied, and return incremented value. |
abstract Chain |
makeAdviceExecutionStmts(AdviceApplication adviceappl,
LocalGeneratorEx localgen,
WeavingContext wc)
Produce a chain containing the statements to execute this piece of advice. |
AbstractAdviceDecl |
makeCopyInAspect(Aspect newaspct)
Make an exact copy of this advice declaration, but change the aspect to the given one. |
abstract WeavingContext |
makeWeavingContext()
|
Residue |
postResidue(ShadowMatch sm)
|
void |
preprocess()
Pointcuts come in normalized and unnormalized versions. |
Residue |
preResidue(ShadowMatch sm)
|
void |
reportMessages(AdviceApplication aa)
Report any errors or warnings for this advice application. |
void |
resetForReweaving()
|
Methods inherited from class abc.weaving.aspectinfo.Syntax |
---|
getPosition |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected AdviceSpec spec
protected Pointcut pc
Constructor Detail |
---|
protected AbstractAdviceDecl(Aspect aspct, AdviceSpec spec, Pointcut pc, java.util.List formals, Position pos)
protected AbstractAdviceDecl(Aspect aspct, AdviceSpec spec, Pointcut pc, java.util.List formals, Position pos, boolean normalized)
Method Detail |
---|
public AdviceSpec getAdviceSpec()
public Aspect getAspect()
public Aspect getDefiningAspect()
protected java.lang.Object clone()
clone
in class java.lang.Object
public AbstractAdviceDecl makeCopyInAspect(Aspect newaspct)
public void preprocess()
Pointcut.normalize
). An advice declaration can be constructed with
the unnormalized version, in which case it is necessary to call this method
before trying to use it for anything pointcut related. It is an error to call
this method if the pointcut has already been normalized.
public Pointcut getPointcut()
public java.util.List getFormals()
public abstract void debugInfo(java.lang.String prefix, java.lang.StringBuffer sb)
public abstract WeavingEnv getWeavingEnv()
public abstract WeavingContext makeWeavingContext()
public void resetForReweaving()
public boolean hasJoinPoint()
public boolean hasJoinPointStaticPart()
public boolean hasEnclosingJoinPoint()
public Residue preResidue(ShadowMatch sm)
public Residue postResidue(ShadowMatch sm)
public abstract Chain makeAdviceExecutionStmts(AdviceApplication adviceappl, LocalGeneratorEx localgen, WeavingContext wc)
adviceappl
- The advice application structure.localgen
- A local variable generator for the method body being woven intowc
- The weaving contextpublic int incrApplCount()
public int getApplCount()
public static int getPrecedence(AbstractAdviceDecl a, AbstractAdviceDecl b)
a
- the first advice decl.b
- the second advice decl.
GlobalAspectInfo.PRECEDENCE_NONE
if none of the advice decls have precedence,
GlobalAspectInfo.PRECEDENCE_FIRST
if the first advice decl has precedence,
GlobalAspectInfo.PRECEDENCE_SECOND
if the second advice decl has precedence, or
GlobalAspectInfo.PRECEDENCE_CONFLICT
if there is a precedence
conflict between the two advice decls.public java.lang.String errorInfo()
public void reportMessages(AdviceApplication aa)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |