org.springframework.aop.aspectj.AspectInstanceFactory implementation
backed by a Spring org.springframework.beans.factory.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.
org.springframework.beans.factory.BeanFactory , LazySingletonAspectInstanceFactoryDecorator
| Modifier and Type | Field and Description |
|---|---|
| private final AspectMetadata | |
| private final BeanFactory | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | BeanFactoryAspectInstanceFactory(BeanFactory
the BeanFactory to obtain instance(s) from beanFactory, String the name of the bean name)Create a BeanFactoryAspectInstanceFactory. |
| public | BeanFactoryAspectInstanceFactory(BeanFactory
the BeanFactory to obtain instance(s) from beanFactory, String the name of the bean name, Class<?> the type that should be introspected by AspectJ
( type)null indicates resolution through BeanFactory#getType via the bean name)Create a BeanFactoryAspectInstanceFactory, providing a type that AspectJ should introspect to create AJType metadata. |
| Modifier and Type | Method and Description |
|---|---|
| public ClassLoader | getAspectClassLoader()
Implements org. |
| public Object | getAspectCreationMutex()
Implements org. |
| public Object | getAspectInstance()
Implements org. |
| public AspectMetadata | getAspectMetadata()
Implements org. |
| public int | getOrder()
Implements org. org. interface (only
checked for singleton beans), or an order expressed through the
org. annotation
at the class level.
|
| public String |
| aspectMetadata | back to summary |
|---|---|
| private final AspectMetadata aspectMetadata | |
| beanFactory | back to summary |
|---|---|
| private final BeanFactory beanFactory | |
| name | back to summary |
|---|---|
| private final String name | |
| BeanFactoryAspectInstanceFactory | back to summary |
|---|---|
| public BeanFactoryAspectInstanceFactory(BeanFactory beanFactory, String name) Create a BeanFactoryAspectInstanceFactory. AspectJ will be called to introspect to create AJType metadata using the type returned for the given bean name from the BeanFactory.
| |
| BeanFactoryAspectInstanceFactory | back to summary |
|---|---|
| public BeanFactoryAspectInstanceFactory(BeanFactory beanFactory, String name, Class<?> type) Create a BeanFactoryAspectInstanceFactory, providing a type that AspectJ should introspect to create AJType metadata. Use if the BeanFactory may consider the type to be a subclass (as when using CGLIB), and the information should relate to a superclass.
| |
| getAspectClassLoader | back to summary |
|---|---|
| public ClassLoader getAspectClassLoader() Implements org. Doc from org. Expose the aspect class loader that this factory uses.
| |
| getAspectCreationMutex | back to summary |
|---|---|
| public Object getAspectCreationMutex() Implements org. Doc from org. Get the best possible creation mutex for this factory. | |
| getAspectInstance | back to summary |
|---|---|
| public Object getAspectInstance() Implements org. Doc from org. Create an instance of this factory's aspect. | |
| getAspectMetadata | back to summary |
|---|---|
| public AspectMetadata getAspectMetadata() Implements org. Doc from org. Get the AspectJ AspectMetadata for this factory's aspect.
| |
| getOrder | back to summary |
|---|---|
| public int getOrder() Implements org. Determine the order for this factory's target aspect, either
an instance-specific order expressed through implementing the
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |