|
The Spring Framework | |||||||||
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 backed by Spring IoC bean.
Note that this may instantiate multiple times if using a prototype, which probably won't give the semantics you expect. Use a LazySingletonMetadataAwareAspectInstanceFactoryDecorator to wrap this to ensure only one new aspect comes back.
LazySingletonMetadataAwareAspectInstanceFactoryDecorator
Constructor Summary | |
---|---|
BeanFactoryAspectInstanceFactory(BeanFactory beanFactory,
String name)
Create a BeanFactoryAspectInstance factory. |
|
BeanFactoryAspectInstanceFactory(BeanFactory beanFactory,
String name,
Class type)
Create a BeanFactoryAspectInstance factory, providing a type that AspectJ should introspect to create AJType metadata. |
Method Summary | |
---|---|
Object |
getAspectInstance()
Create an instance of this factory's aspect. |
AspectMetadata |
getAspectMetadata()
|
int |
getInstantiationCount()
Return the number of instantiations from this factory. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BeanFactoryAspectInstanceFactory(BeanFactory beanFactory, String name)
beanFactory
- BeanFactory to obtain instance(s) fromname
- name of the beanpublic BeanFactoryAspectInstanceFactory(BeanFactory beanFactory, String name, Class type)
beanFactory
- BeanFactory to obtain instance(s) fromname
- name of the beantype
- type that should be introspected by AspectJ.Method Detail |
---|
public Object getAspectInstance()
AspectInstanceFactory
getAspectInstance
in interface AspectInstanceFactory
public AspectMetadata getAspectMetadata()
getAspectMetadata
in interface MetadataAwareAspectInstanceFactory
public int getInstantiationCount()
AspectInstanceFactory
getInstantiationCount
in interface AspectInstanceFactory
public String toString()
toString
in class Object
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |