public class GeneratedAdvisorInterceptor extends Object implements Interceptor
Constructor and Description |
---|
GeneratedAdvisorInterceptor(InterceptorFactory factory,
GeneratedClassAdvisor advisor,
Joinpoint joinpoint) |
GeneratedAdvisorInterceptor(InterceptorFactory factory,
GeneratedClassAdvisor advisor,
Joinpoint joinpoint,
String cflowString,
ASTCFlowExpression cflowExpr) |
Modifier and Type | Method and Description |
---|---|
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() |
public GeneratedAdvisorInterceptor(InterceptorFactory factory, GeneratedClassAdvisor advisor, Joinpoint joinpoint, String cflowString, ASTCFlowExpression cflowExpr)
public GeneratedAdvisorInterceptor(InterceptorFactory factory, GeneratedClassAdvisor advisor, Joinpoint joinpoint)
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 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 interceptedInvocation.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()
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.