|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectMethodDecl_c
abc.aspectj.extension.AJMethodDecl_c
abc.aspectj.ast.AdviceDecl_c
public class AdviceDecl_c
Declarations of advice, for example
before(int x) // the "advice spec"
:
call(* fac(*)) && args(x) // pointcut
{ System.out.println(x);} // body
Field Summary | |
---|---|
protected boolean |
canRewriteThisJoinPoint
|
protected boolean |
hasEnclosingJoinPointStaticPart
record whether thisEnclosingJoinPointStaticPart occurs in the advice body. |
protected boolean |
hasJoinPoint
record whether thisJoinPoint occurs in the advice body. |
protected boolean |
hasJoinPointStaticPart
record whether thisJoinPointStaticPart occurs in the advice body. |
protected java.util.Set |
methodsInAdvice
|
protected Pointcut |
pc
pointcut that specifies the joinpoints where this advice applies |
protected AdviceFormal |
retval
the return formal, for afterreturning and
afterthrowing advice |
protected AdviceSpec |
spec
advice specification (e.g. |
protected int |
spec_retval_pos
|
protected LocalInstance |
thisEnclosingJoinPointStaticPartInstance
|
protected LocalInstance |
thisJoinPointInstance
|
protected LocalInstance |
thisJoinPointStaticPartInstance
|
Constructor Summary | |
---|---|
AdviceDecl_c(Position pos,
Flags flags,
AdviceSpec spec,
java.util.List throwTypes,
Pointcut pc,
Block body)
|
Method Summary | |
---|---|
java.util.List |
acceptCFG(CFGBuilder v,
java.util.List succs)
Visit this term in evaluation order. |
void |
aspectMethodsEnter(AspectMethods visitor)
|
Node |
aspectMethodsLeave(AspectMethods visitor,
AJNodeFactory nf,
AJTypeSystem ts)
|
Node |
buildTypes(TypeBuilder tb)
build the type; the spec is included in the advice instance to give intelligible error messages - see adviceInstance overrides |
NodeVisitor |
disambiguateEnter(AmbiguityRemover ar)
|
void |
enterAspectReflectionInspect(AspectReflectionInspect v,
Node parent)
|
void |
enterAspectReflectionRewrite(AspectReflectionRewrite v,
AJTypeSystem ts)
|
Context |
enterScope(Context c)
|
Context |
enterScope(Node child,
Context c)
|
Term |
entry()
|
boolean |
hasEnclosingJoinPointStaticPart()
|
boolean |
hasJoinPoint()
does "thisJoinPoint" occur in the advice body? |
boolean |
hasJoinPointStaticPart()
does "thisJoinPointStaticPart" occur in the advice body? |
void |
joinpointFormals(Local n)
register the use of "thisJoinPoint" etc. |
void |
leaveAspectReflectionInspect(AspectReflectionInspect v)
|
Node |
leaveAspectReflectionRewrite(AspectReflectionRewrite v,
AJNodeFactory nf)
|
void |
localMethod(CodeInstance ci)
register methods or constructors that are local to the advice, for later use in weaver |
protected MethodInstance |
makeMethodInstance(ClassType ct,
TypeSystem ts)
|
MethodDecl |
methodDecl(AJNodeFactory nf,
AJTypeSystem ts)
generate a MethodDecl for the advice body |
void |
prettyPrint(CodeWriter w,
PrettyPrinter tr)
|
MethodDecl |
proceedDecl(AJNodeFactory nf,
AJTypeSystem ts)
generate a dummy MethodDecl for the proceed. |
protected AdviceDecl_c |
reconstruct(TypeNode returnType,
java.util.List formals,
java.util.List throwTypes,
Block body,
AdviceSpec spec,
AdviceFormal retval,
Pointcut pc)
|
Node |
typeCheck(TypeChecker tc)
Type check the advice: first the usual method checks, then whether the "throwing" result is actually throwable |
void |
update(GlobalAspectInfo gai,
Aspect current_aspect)
Called by the AspectInfoHarvester to tell the node to
put all relevant information into the GlobalAspectInfo . |
Node |
visitChildren(NodeVisitor v)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected AdviceSpec spec
before(formals), around(..), after returning(..)
)
protected Pointcut pc
protected AdviceFormal retval
afterreturning
and
afterthrowing
advice
protected boolean hasJoinPoint
thisJoinPoint
occurs in the advice body.
set by joinPointFormals(Local)
protected boolean hasJoinPointStaticPart
thisJoinPointStaticPart
occurs in the advice body.
set by joinPointFormals(Local)
protected boolean hasEnclosingJoinPointStaticPart
thisEnclosingJoinPointStaticPart
occurs in the advice body.
set by joinPointFormals(Local)
protected LocalInstance thisJoinPointInstance
protected LocalInstance thisJoinPointStaticPartInstance
protected LocalInstance thisEnclosingJoinPointStaticPartInstance
protected boolean canRewriteThisJoinPoint
protected java.util.Set methodsInAdvice
protected int spec_retval_pos
Constructor Detail |
---|
public AdviceDecl_c(Position pos, Flags flags, AdviceSpec spec, java.util.List throwTypes, Pointcut pc, Block body)
Method Detail |
---|
protected AdviceDecl_c reconstruct(TypeNode returnType, java.util.List formals, java.util.List throwTypes, Block body, AdviceSpec spec, AdviceFormal retval, Pointcut pc)
public Node visitChildren(NodeVisitor v)
public NodeVisitor disambiguateEnter(AmbiguityRemover ar) throws SemanticException
disambiguateEnter
in class AJMethodDecl_c
SemanticException
public MethodDecl proceedDecl(AJNodeFactory nf, AJTypeSystem ts)
AdviceDecl
proceedDecl
in interface AdviceDecl
public boolean hasJoinPointStaticPart()
AdviceDecl
hasJoinPointStaticPart
in interface AdviceDecl
public boolean hasJoinPoint()
AdviceDecl
hasJoinPoint
in interface AdviceDecl
public boolean hasEnclosingJoinPointStaticPart()
public void joinpointFormals(Local n)
AdviceDecl
joinpointFormals
in interface AdviceDecl
n
- test whether this local is "thisJoinPoint" etc();public MethodDecl methodDecl(AJNodeFactory nf, AJTypeSystem ts)
AdviceDecl
methodDecl
in interface AdviceDecl
public Context enterScope(Context c)
public Context enterScope(Node child, Context c)
public Node typeCheck(TypeChecker tc) throws SemanticException
SemanticException
public Node buildTypes(TypeBuilder tb) throws SemanticException
SemanticException
protected MethodInstance makeMethodInstance(ClassType ct, TypeSystem ts) throws SemanticException
SemanticException
public void prettyPrint(CodeWriter w, PrettyPrinter tr)
public void localMethod(CodeInstance ci)
AdviceDecl
localMethod
in interface AdviceDecl
ci
- code instance to registerpublic void update(GlobalAspectInfo gai, Aspect current_aspect)
ContainsAspectInfo
AspectInfoHarvester
to tell the node to
put all relevant information into the GlobalAspectInfo
.
update
in interface ContainsAspectInfo
gai
- the target of the information.current_aspect
- the aspect currently being traversed.public void aspectMethodsEnter(AspectMethods visitor)
aspectMethodsEnter
in interface MakesAspectMethods
public Node aspectMethodsLeave(AspectMethods visitor, AJNodeFactory nf, AJTypeSystem ts)
aspectMethodsLeave
in interface MakesAspectMethods
public void enterAspectReflectionInspect(AspectReflectionInspect v, Node parent)
enterAspectReflectionInspect
in interface TransformsAspectReflection
public void leaveAspectReflectionInspect(AspectReflectionInspect v)
leaveAspectReflectionInspect
in interface TransformsAspectReflection
public void enterAspectReflectionRewrite(AspectReflectionRewrite v, AJTypeSystem ts)
enterAspectReflectionRewrite
in interface TransformsAspectReflection
public Node leaveAspectReflectionRewrite(AspectReflectionRewrite v, AJNodeFactory nf)
leaveAspectReflectionRewrite
in interface TransformsAspectReflection
public Term entry()
public java.util.List acceptCFG(CFGBuilder v, java.util.List succs)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |