public class LazySingletonAspectInstanceFactoryDecorator extends Object implements MetadataAwareAspectInstanceFactory, Serializable
MetadataAwareAspectInstanceFactory
to instantiate only once.HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
LazySingletonAspectInstanceFactoryDecorator(MetadataAwareAspectInstanceFactory maaif)
Create a new lazily initializing decorator for the given AspectInstanceFactory.
|
Modifier and Type | Method and Description |
---|---|
ClassLoader |
getAspectClassLoader()
Expose the aspect class loader that this factory uses.
|
Object |
getAspectCreationMutex()
Return the best possible creation mutex for this factory.
|
Object |
getAspectInstance()
Create an instance of this factory's aspect.
|
AspectMetadata |
getAspectMetadata()
Return the AspectJ AspectMetadata for this factory's aspect.
|
int |
getOrder()
Get the order value of this object.
|
boolean |
isMaterialized() |
String |
toString() |
public LazySingletonAspectInstanceFactoryDecorator(MetadataAwareAspectInstanceFactory maaif)
maaif
- the MetadataAwareAspectInstanceFactory to decoratepublic Object getAspectInstance()
AspectInstanceFactory
getAspectInstance
in interface AspectInstanceFactory
null
)public boolean isMaterialized()
public ClassLoader getAspectClassLoader()
AspectInstanceFactory
getAspectClassLoader
in interface AspectInstanceFactory
null
)public AspectMetadata getAspectMetadata()
MetadataAwareAspectInstanceFactory
getAspectMetadata
in interface MetadataAwareAspectInstanceFactory
public Object getAspectCreationMutex()
MetadataAwareAspectInstanceFactory
getAspectCreationMutex
in interface MetadataAwareAspectInstanceFactory
null
for no mutex to use)public int getOrder()
Ordered
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-startup
values).
Same order values will result in arbitrary sort positions for the affected objects.
getOrder
in interface Ordered
Ordered.HIGHEST_PRECEDENCE
,
Ordered.LOWEST_PRECEDENCE