abc.weaving.aspectinfo
Class DeclareMessage
java.lang.Object
abc.weaving.aspectinfo.Syntax
abc.weaving.aspectinfo.AbstractAdviceDecl
abc.weaving.aspectinfo.DeclareMessage
- All Implemented Interfaces:
- java.lang.Cloneable
public class DeclareMessage
- extends AbstractAdviceDecl
A declare warning
or declare error
declaration.
- Author:
- Aske Simon Christensen, Ganesh Sittampalam
Methods inherited from class abc.weaving.aspectinfo.AbstractAdviceDecl |
clone, errorInfo, getAdviceSpec, getApplCount, getAspect, getDefiningAspect, getFormals, getPointcut, getPrecedence, hasEnclosingJoinPoint, hasJoinPoint, hasJoinPointStaticPart, incrApplCount, makeCopyInAspect, preprocess, preResidue, resetForReweaving |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
WARNING
public static final int WARNING
- See Also:
- Constant Field Values
ERROR
public static final int ERROR
- See Also:
- Constant Field Values
DeclareMessage
public DeclareMessage(int severity,
Pointcut pc,
java.lang.String message,
Aspect aspct,
Position pos)
getSeverity
public int getSeverity()
- Get the severity of the message.
- Returns:
- either
WARNING
or ERROR
.
getSeverityName
public java.lang.String getSeverityName()
- Get the name of the severity of the message.
- Returns:
- either
&qout;warning"
or &qout;error"
.
getMessage
public java.lang.String getMessage()
- Get the message to give if the pointcut matches anything.
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
makeWeavingContext
public WeavingContext makeWeavingContext()
- Specified by:
makeWeavingContext
in class AbstractAdviceDecl
postResidue
public Residue postResidue(ShadowMatch sm)
- Overrides:
postResidue
in class AbstractAdviceDecl
generateMessage
public void generateMessage(ShadowMatch sm)
makeAdviceExecutionStmts
public Chain makeAdviceExecutionStmts(AdviceApplication aa,
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:
aa
- The advice application structure.localgen
- A local variable generator for the method body being woven intowc
- The weaving context
reportMessages
public void reportMessages(AdviceApplication adviceappl)
- Report any errors or warnings for this advice application.
- Overrides:
reportMessages
in class AbstractAdviceDecl