public class AdviceFactory extends Object implements InterceptorFactory
Constructor and Description |
---|
AdviceFactory(AspectDefinition aspect,
String adviceName)
Creates a factory that generates advice interceptors.
|
AdviceFactory(AspectDefinition aspect,
String adviceName,
AdviceType type)
Creates a factory that generates advice interceptors.
|
Modifier and Type | Method and Description |
---|---|
Interceptor |
create(Advisor advisor,
Joinpoint joinpoint)
Creates an interceptor that represents this advice and that delegates
execution to this advice.
|
boolean |
equals(Object obj) |
String |
getAdvice()
Returns the name of the advice method.
|
AspectDefinition |
getAspect()
Returns the definition of the aspect that contains this advice method.
|
String |
getName()
Returns the name that identifies this interceptor/advice.
|
AdviceType |
getType()
Returns the type of the advice.
|
boolean |
isDeployed()
Indicates whether this interceptor/advice is deployed.
|
public AdviceFactory(AspectDefinition aspect, String adviceName)
default type
.aspect
- definition of the aspect that contains the advice methodadviceName
- name of the advice methodpublic AdviceFactory(AspectDefinition aspect, String adviceName, AdviceType type)
aspect
- definition of the aspect that contains the advice methodadviceName
- name of the advice methodtype
- the type of the advicepublic AspectDefinition getAspect()
getAspect
in interface InterceptorFactory
public String getAdvice()
getAdvice
in interface InterceptorFactory
public AdviceType getType()
getType
in interface InterceptorFactory
public boolean isDeployed()
InterceptorFactory
isDeployed
in interface InterceptorFactory
public Interceptor create(Advisor advisor, Joinpoint joinpoint)
InterceptorFactory
create
in interface InterceptorFactory
advisor
- advisor, indicates an instance or class where the interception
will occurjoinpoint
- the joinpoint that will be interceptedpublic String getName()
InterceptorFactory
getName
in interface InterceptorFactory
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.