|
|||||||||
| 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
|
int |
sourceId
|
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()
Returns how often this advice was applied during weaving. |
java.lang.String |
getApplWarning()
Returns a warning if this AdviceDecl does not match any static joinpoints, otherwise returns null. |
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()
|
abstract WeavingEnv |
getWeavingEnv()
|
boolean |
hasEnclosingJoinPoint()
|
boolean |
hasJoinPoint()
|
boolean |
hasJoinPointStaticPart()
|
void |
incrApplCount()
Increment the number of times this advice is applied. |
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 |
|---|
public int sourceId
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.Objectpublic 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 void incrApplCount()
public java.lang.String getApplWarning()
public int getApplCount()
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 | ||||||||