|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.aop.advice.AspectFactoryWithClassLoaderSupport
org.jboss.aop.advice.GenericAspectFactory
public class GenericAspectFactory
Constructor Summary | |
---|---|
GenericAspectFactory(String classname,
Element element)
|
Method Summary | |
---|---|
protected void |
configureInstance(Object instance,
Advisor advisor,
InstanceAdvisor instanceAdvisor,
Joinpoint jp)
|
Object |
createPerClass(Advisor advisor)
Creates an aspect with scope value Scope.PER_CLASS . |
Object |
createPerInstance(Advisor advisor,
InstanceAdvisor instanceAdvisor)
Creates an aspect with scope value Scope.PER_INSTANCE . |
Object |
createPerJoinpoint(Advisor advisor,
InstanceAdvisor instanceAdvisor,
Joinpoint jp)
Creates an aspect with scope value or Scope.PER_JOINPOINT . |
Object |
createPerJoinpoint(Advisor advisor,
Joinpoint jp)
Creates an aspect with scope value Scope.PER_CLASS_JOINPOINT or
Scope.PER_JOINPOINT . |
Object |
createPerVM()
Creates an aspect with scope value Scope.PER_VM . |
String |
getClassname()
|
Class<?> |
getClazz()
Deprecated. |
Element |
getElement()
|
protected String |
getInjectorName(String attributeName)
|
String |
getName()
The name that identifies the aspect in its domain. |
protected void |
injectAdvisor(Object instance,
Advisor advisor,
String attributeName)
|
protected void |
injectInstanceAdvisor(Object instance,
InstanceAdvisor instanceAdvisor,
String attributeName)
|
protected void |
injectJoinpoint(Object instance,
Joinpoint jp,
String attributeName)
|
protected void |
setAttribute(Object instance,
PropertyDescriptor[] descriptors,
String attributeName,
String attributeText)
|
void |
setClassname(String classname)
|
void |
setElement(Element element)
|
Methods inherited from class org.jboss.aop.advice.AspectFactoryWithClassLoaderSupport |
---|
getLoader, loadClass, peekScopedClassLoader, popScopedClassLoader, pushScopedClassLoader, setClassLoader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GenericAspectFactory(String classname, Element element)
Method Detail |
---|
public String getClassname()
public void setClassname(String classname)
public String getName()
AspectFactory
Domain
public Element getElement()
public void setElement(Element element)
@Deprecated public Class<?> getClazz()
public Object createPerVM()
AspectFactory
Scope.PER_VM
.
null
, the aspect
represented by this factory is ignored, resulting in no interception.public Object createPerClass(Advisor advisor)
AspectFactory
Scope.PER_CLASS
.
advisor
- manages all the interceptions that should occur during execution
of a specific class
advisor
. If
null
, the aspect represented by this factory is ignored,
resulting in no interception of the joinpoints contained in the
referred class.Advisor.getClazz()
public Object createPerInstance(Advisor advisor, InstanceAdvisor instanceAdvisor)
AspectFactory
Scope.PER_INSTANCE
.
advisor
- manages all the interceptions that should occur during
execution of a specific classinstanceAdvisor
- manages all the interceptions that should occur during
execution of a specific instance. The instance it
manages is an object of the class managed by
advisor
instanceAdvisor
. If null
, the aspect
represented by this factory is ignored, resulting in no
interception of the joinpoints contained in the referred
instance.Advisor.getClazz()
,
InstanceAdvisor.getInstance()
public Object createPerJoinpoint(Advisor advisor, Joinpoint jp)
AspectFactory
Scope.PER_CLASS_JOINPOINT
or
Scope.PER_JOINPOINT
.
PER_CLASS_JOINPOINT
, this method will always
be invoked to create the aspect instance. On the other hand, if the scope value
is PER_JOINPOINT
, this method is called only if the joinpoint
to be intercepted is in a static context (like a static method, a static field
access, or a constructor execution).
advisor
- manages all the interceptions that should occur during
execution of a specific classjp
- the joinpoint to be intercepted by the created instance.
This joinpoint is contained in the class managed by
advisor
jp
. If null
, the aspect represented by this
factory is ignored, resulting in no interception of jp
.Advisor.getClazz()
,
Joinpoint
public Object createPerJoinpoint(Advisor advisor, InstanceAdvisor instanceAdvisor, Joinpoint jp)
AspectFactory
Scope.PER_JOINPOINT
.
advisor
- manages all the interceptions that should occur
during execution of a specific classinstanceAdvisor
- manages all the interceptions that should occur during
execution of a specific instance. The instance it
manages is an object of the class managed by
advisor
jp
- the joinpoint to be intercepted by the created instance.
This joinpoint is contained in the class managed by
advisor
jp
when it happens on the instance
managed by instanceAdvisor
. If null
, the
aspect represented by this factory is ignored, resulting
in no interception of jp
when it is executed in
the context of the referred instance.Advisor.getClazz()
,
InstanceAdvisor.getInstance()
,
Joinpoint
protected void configureInstance(Object instance, Advisor advisor, InstanceAdvisor instanceAdvisor, Joinpoint jp)
protected void setAttribute(Object instance, PropertyDescriptor[] descriptors, String attributeName, String attributeText)
protected void injectAdvisor(Object instance, Advisor advisor, String attributeName)
protected void injectJoinpoint(Object instance, Joinpoint jp, String attributeName)
protected void injectInstanceAdvisor(Object instance, InstanceAdvisor instanceAdvisor, String attributeName)
protected String getInjectorName(String attributeName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |