Class LazySingletonAspectInstanceFactoryDecorator
java.lang.Object
org.springframework.aop.aspectj.annotation.LazySingletonAspectInstanceFactoryDecorator
- All Implemented Interfaces:
Serializable,MetadataAwareAspectInstanceFactory,AspectInstanceFactory,Ordered
public class LazySingletonAspectInstanceFactoryDecorator
extends Object
implements MetadataAwareAspectInstanceFactory, Serializable
Decorator to cause a
MetadataAwareAspectInstanceFactory to instantiate only once.- Since:
- 2.0
- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new lazily initializing decorator for the given AspectInstanceFactory. -
Method Summary
Modifier and TypeMethodDescriptionExpose the aspect class loader that this factory uses.Return the best possible creation mutex for this factory.Create an instance of this factory's aspect.Return the AspectJ AspectMetadata for this factory's aspect.intgetOrder()Get the order value of this object.booleantoString()
-
Constructor Details
-
LazySingletonAspectInstanceFactoryDecorator
Create a new lazily initializing decorator for the given AspectInstanceFactory.- Parameters:
maaif- the MetadataAwareAspectInstanceFactory to decorate
-
-
Method Details
-
getAspectInstance
Description copied from interface:AspectInstanceFactoryCreate an instance of this factory's aspect.- Specified by:
getAspectInstancein interfaceAspectInstanceFactory- Returns:
- the aspect instance (never
null)
-
isMaterialized
public boolean isMaterialized() -
getAspectClassLoader
Description copied from interface:AspectInstanceFactoryExpose the aspect class loader that this factory uses.- Specified by:
getAspectClassLoaderin interfaceAspectInstanceFactory- Returns:
- the aspect class loader (or
nullfor the bootstrap loader) - See Also:
-
getAspectMetadata
Description copied from interface:MetadataAwareAspectInstanceFactoryReturn the AspectJ AspectMetadata for this factory's aspect.- Specified by:
getAspectMetadatain interfaceMetadataAwareAspectInstanceFactory- Returns:
- the aspect metadata
-
getAspectCreationMutex
Description copied from interface:MetadataAwareAspectInstanceFactoryReturn the best possible creation mutex for this factory.- Specified by:
getAspectCreationMutexin interfaceMetadataAwareAspectInstanceFactory- Returns:
- the mutex object (may be
nullfor no mutex to use)
-
getOrder
public int getOrder()Description copied from interface:OrderedGet the order value of this object.Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet
load-on-startupvalues).Same order values will result in arbitrary sort positions for the affected objects.
-
toString
-