|
|||||||||
| 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.AdviceBody_c
public abstract class AdviceBody_c
An advice-body is similar to a normal method, but it can contain
references to special variables like thisJoinPoint
and, if it is around-advice, proceed().
| 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 boolean |
isAroundAdvice
|
protected java.util.Set |
methodsInAdvice
|
protected LocalInstance |
thisEnclosingJoinPointStaticPartInstance
|
protected LocalInstance |
thisJoinPointInstance
|
protected LocalInstance |
thisJoinPointStaticPartInstance
|
| Constructor Summary | |
|---|---|
AdviceBody_c(Position pos,
Flags flags,
TypeNode return_type,
java.lang.String name,
java.util.List formals,
java.util.List throwTypes,
Block body,
boolean isAroundAdvice)
|
|
| Method Summary | |
|---|---|
protected void |
addExtraFormals(AJNodeFactory nf,
AJTypeSystem ts,
java.util.List formals,
java.util.List formalTypes)
|
protected abstract java.lang.String |
adviceSignature()
|
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)
|
protected Expr |
dummyVal(AJNodeFactory nf,
Type t)
|
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 |
abstract void |
prettyPrint(CodeWriter w,
PrettyPrinter tr)
|
MethodDecl |
proceedDecl(AJNodeFactory nf,
AJTypeSystem ts)
generate a dummy MethodDecl for the proceed. |
Node |
typeCheck(TypeChecker tc)
Type check the advice: first the usual method checks, then whether the "throwing" result is actually throwable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface abc.aspectj.visit.ContainsAspectInfo |
|---|
update |
| Field Detail |
|---|
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 boolean isAroundAdvice
| Constructor Detail |
|---|
public AdviceBody_c(Position pos,
Flags flags,
TypeNode return_type,
java.lang.String name,
java.util.List formals,
java.util.List throwTypes,
Block body,
boolean isAroundAdvice)
| Method Detail |
|---|
public NodeVisitor disambiguateEnter(AmbiguityRemover ar)
throws SemanticException
disambiguateEnter in class AJMethodDecl_cSemanticException
protected Expr dummyVal(AJNodeFactory nf,
Type t)
public MethodDecl proceedDecl(AJNodeFactory nf,
AJTypeSystem ts)
AdviceDecl
proceedDecl in interface AdviceDeclpublic boolean hasJoinPointStaticPart()
AdviceDecl
hasJoinPointStaticPart in interface AdviceDeclpublic boolean hasJoinPoint()
AdviceDecl
hasJoinPoint in interface AdviceDeclpublic boolean hasEnclosingJoinPointStaticPart()
public void joinpointFormals(Local n)
AdviceDecl
joinpointFormals in interface AdviceDecln - test whether this local is "thisJoinPoint" etc();
protected void addExtraFormals(AJNodeFactory nf,
AJTypeSystem ts,
java.util.List formals,
java.util.List formalTypes)
public MethodDecl methodDecl(AJNodeFactory nf,
AJTypeSystem ts)
AdviceDecl
methodDecl in interface AdviceDeclpublic Context enterScope(Context c)
public Context enterScope(Node child,
Context c)
public Node typeCheck(TypeChecker tc)
throws SemanticException
SemanticExceptionprotected abstract java.lang.String adviceSignature()
public Node buildTypes(TypeBuilder tb)
throws SemanticException
SemanticException
protected MethodInstance makeMethodInstance(ClassType ct,
TypeSystem ts)
throws SemanticException
SemanticException
public abstract void prettyPrint(CodeWriter w,
PrettyPrinter tr)
public void localMethod(CodeInstance ci)
AdviceDecl
localMethod in interface AdviceDeclci - code instance to registerpublic 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 TransformsAspectReflectionpublic 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 TransformsAspectReflectionpublic Term entry()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||