public class PerJoinpointAdvice extends AbstractAdvice
adviceName, aspectClass, conCalledByConstructorAdvice, conCalledByMethodAdvice, constructionAdvice, constructorAdvice, fieldAdvice, fieldReadAdvice, fieldWriteAdvice, invocationAdvice, methodAdvice, methodCalledByConstructorAdvice, methodCalledByMethodAdvice| Constructor and Description |
|---|
PerJoinpointAdvice(String adviceName,
AspectDefinition a,
Advisor advisor,
Joinpoint joinpoint) |
| Modifier and Type | Method and Description |
|---|---|
static Interceptor |
createInterceptor(Advisor advisor,
Joinpoint joinpoint,
AspectDefinition def,
String adviceName) |
Object |
getAspectInstance() |
Object |
getAspectInstance(InstanceAdvisor instanceAdvisor) |
String |
getName()
Returns the name of this interceptor.
|
Object |
invoke(Invocation invocation)
The single advice contained in the
Interceptor. |
findByConstructionInvocation, findByConstructorCalledByConstructorInvocation, findByConstructorCalledByMethodInvocation, findByConstructorInvocation, findByFieldInvocation, findByFieldReadInvocation, findByFieldWriteInvocation, findByInvocation, findByMethodCalledByConstructorInvocation, findByMethodCalledByMethodInvocation, findByMethodInvocation, getAdviceName, init, resolveAdvicepublic PerJoinpointAdvice(String adviceName, AspectDefinition a, Advisor advisor, Joinpoint joinpoint)
public static Interceptor createInterceptor(Advisor advisor, Joinpoint joinpoint, AspectDefinition def, String adviceName) throws Exception
Exceptionpublic String getName()
Interceptordomain.domainpublic Object invoke(Invocation invocation) throws Throwable
InterceptorInterceptor.
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.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 Object getAspectInstance()
getAspectInstance in class AbstractAdvicepublic Object getAspectInstance(InstanceAdvisor instanceAdvisor)
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.