|
JBoss AOP Parent POM 2.2.2.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.aop.advice.GeneratedAdvisorInterceptor
public class GeneratedAdvisorInterceptor
Special interceptor wrapping the interceptor factory, so that generated advisors have all the information they need about the contained advices for generating the invocation methods. If we are invoked upon dymamically we use vanilla invocations, i.e. the generated invocation code does not step in, so we generate the interceptor class as and when needed in our invoke() method. Old skool class advisors do not use this class
Constructor Summary | |
---|---|
GeneratedAdvisorInterceptor(InterceptorFactory factory,
GeneratedClassAdvisor advisor,
Joinpoint joinpoint)
|
|
GeneratedAdvisorInterceptor(InterceptorFactory factory,
GeneratedClassAdvisor advisor,
Joinpoint joinpoint,
String cflowString,
ASTCFlowExpression cflowExpr)
|
Method Summary | |
---|---|
Interceptor |
create(Advisor advisor,
Joinpoint joinpoint)
|
boolean |
equals(Object obj)
|
String |
getAdviceName()
|
String |
getAdviceString()
|
AspectDefinition |
getAspect()
|
Object |
getAspect(Advisor advisor,
Joinpoint joinpoint)
Used to obtain aspects from the generated code at runtime for joinpoints/aspects requiring an instance advisor |
Object |
getAspect(Advisor advisor,
Joinpoint joinpoint,
boolean forCodeGeneration)
Also used as a convenience method to create aspect instances for the JoinPointGenerator in order to figure out what the class of the aspect should be when making the call from the generated joinpoint class. |
String |
getAspectClassName()
|
ASTCFlowExpression |
getCflowExpression()
|
String |
getCFlowString()
|
InterceptorFactory |
getDelegate()
|
String |
getName()
Returns the name of this interceptor. |
Object |
getPerInstanceAspect(Advisor advisor,
Joinpoint joinpoint,
InstanceAdvisor ia)
Used to obtain aspects from the generated code at runtime for joinpoints/aspects requiring an instance advisor |
String |
getRegisteredName()
|
Scope |
getScope()
|
AdviceType |
getType()
|
Object |
invoke(Invocation invocation)
The single advice contained in the Interceptor . |
boolean |
isAspectFactory()
|
boolean |
isInterceptor()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GeneratedAdvisorInterceptor(InterceptorFactory factory, GeneratedClassAdvisor advisor, Joinpoint joinpoint, String cflowString, ASTCFlowExpression cflowExpr)
public GeneratedAdvisorInterceptor(InterceptorFactory factory, GeneratedClassAdvisor advisor, Joinpoint joinpoint)
Method Detail |
---|
public Interceptor create(Advisor advisor, Joinpoint joinpoint)
public Object getAspect(Advisor advisor, Joinpoint joinpoint)
public Object getAspect(Advisor advisor, Joinpoint joinpoint, boolean forCodeGeneration)
public Object getPerInstanceAspect(Advisor advisor, Joinpoint joinpoint, InstanceAdvisor ia)
public boolean isAspectFactory()
public InterceptorFactory getDelegate()
public AspectDefinition getAspect()
public String getName()
Interceptor
domain
.
getName
in interface Interceptor
domain
public String getAspectClassName()
public AdviceType getType()
public boolean isInterceptor()
public String getAdviceName()
public Scope getScope()
public String getRegisteredName()
public ASTCFlowExpression getCflowExpression()
public String getCFlowString()
public boolean equals(Object obj)
equals
in class Object
public Object invoke(Invocation invocation) throws Throwable
Interceptor
Interceptor
.
invocation.invokeNext()
method (if there are not elements left to
be called in the chain, this method invokes the joinpoint itself). Not doing
so means halting the execution of the interceptor chain and, hence, avoiding
the execution of the joinpoint. This should be done only when the
interceptor must replace the joinpoint execution.
invoke
in interface Interceptor
invocation
- represents the joinpoint to be intercepted
Invocation.invokeNext()
. In case this is the first
interceptor in the chain, this value will replace the
joinpoint return value in the basis system.
Throwable
- may throw any exceptions declared by the joinpoint itself.
If this exception is not declared and is not a runtime
exception, it will be encapsulated in a
RuntimeException
before being thrown to the basis
system.public String getAdviceString()
|
JBoss AOP Parent POM 2.2.2.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |