public class LazySingletonAspectInstanceFactoryDecorator extends Object implements MetadataAwareAspectInstanceFactory
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 |
getAspectInstance()
Create an instance of this factory's aspect.
|
AspectMetadata |
getAspectMetadata()
Return the AspectJ AspectMetadata for this factory's aspect.
|
int |
getOrder()
Return the order value of this object, with a
higher value meaning greater in terms of sorting.
|
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 int getOrder()
Ordered
Normally starting with 0, with Integer.MAX_VALUE
indicating the greatest value. Same order values will result
in arbitrary positions for the affected objects.
Higher values can be interpreted as lower priority. As a consequence, the object with the lowest value has highest priority (somewhat analogous to Servlet "load-on-startup" values).