|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.aop.aspectj.annotation.BeanFactoryAspectInstanceFactory
public class BeanFactoryAspectInstanceFactory
AspectInstanceFactory
implementation
backed by a Spring BeanFactory
.
Note that this may instantiate multiple times if using a prototype,
which probably won't give the semantics you expect.
Use a LazySingletonAspectInstanceFactoryDecorator
to wrap this to ensure only one new aspect comes back.
BeanFactory
,
LazySingletonAspectInstanceFactoryDecorator
Field Summary | |
---|---|
private AspectMetadata |
aspectMetadata
|
private BeanFactory |
beanFactory
|
private java.lang.String |
name
|
Fields inherited from interface org.springframework.core.Ordered |
---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Constructor Summary | |
---|---|
BeanFactoryAspectInstanceFactory(BeanFactory beanFactory,
java.lang.String name)
Create a BeanFactoryAspectInstanceFactory. |
|
BeanFactoryAspectInstanceFactory(BeanFactory beanFactory,
java.lang.String name,
java.lang.Class type)
Create a BeanFactoryAspectInstanceFactory, providing a type that AspectJ should introspect to create AJType metadata. |
Method Summary | |
---|---|
java.lang.ClassLoader |
getAspectClassLoader()
Expose the aspect class loader that this factory uses. |
java.lang.Object |
getAspectInstance()
Create an instance of this factory's aspect. |
AspectMetadata |
getAspectMetadata()
Return the AspectJ AspectMetadata for this factory's aspect. |
int |
getOrder()
Determine the order for this factory's target aspect, either an instance-specific order expressed through implementing the Ordered interface (only
checked for singleton beans), or an order expressed through the
Order annotation
at the class level. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final BeanFactory beanFactory
private final java.lang.String name
private final AspectMetadata aspectMetadata
Constructor Detail |
---|
public BeanFactoryAspectInstanceFactory(BeanFactory beanFactory, java.lang.String name)
beanFactory
- BeanFactory to obtain instance(s) fromname
- name of the beanpublic BeanFactoryAspectInstanceFactory(BeanFactory beanFactory, java.lang.String name, java.lang.Class type)
beanFactory
- BeanFactory to obtain instance(s) fromname
- the name of the beantype
- the type that should be introspected by AspectJMethod Detail |
---|
public java.lang.Object getAspectInstance()
AspectInstanceFactory
getAspectInstance
in interface AspectInstanceFactory
null
)public java.lang.ClassLoader getAspectClassLoader()
AspectInstanceFactory
getAspectClassLoader
in interface AspectInstanceFactory
null
)public AspectMetadata getAspectMetadata()
MetadataAwareAspectInstanceFactory
getAspectMetadata
in interface MetadataAwareAspectInstanceFactory
public int getOrder()
Ordered
interface (only
checked for singleton beans), or an order expressed through the
Order
annotation
at the class level.
getOrder
in interface Ordered
Ordered
,
Order
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |