public class LazySingletonAspectInstanceFactoryDecorator extends java.lang.Object implements MetadataAwareAspectInstanceFactory
MetadataAwareAspectInstanceFactory
to instantiate only once.Modifier and Type | Field and Description |
---|---|
private MetadataAwareAspectInstanceFactory |
maaif |
private java.lang.Object |
materialized |
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 |
---|---|
java.lang.ClassLoader |
getAspectClassLoader()
Expose the aspect class loader that this factory uses.
|
java.lang.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() |
java.lang.String |
toString() |
private final MetadataAwareAspectInstanceFactory maaif
private volatile java.lang.Object materialized
public LazySingletonAspectInstanceFactoryDecorator(MetadataAwareAspectInstanceFactory maaif)
maaif
- the MetadataAwareAspectInstanceFactory to decoratepublic java.lang.Object getAspectInstance()
AspectInstanceFactory
getAspectInstance
in interface AspectInstanceFactory
null
)public boolean isMaterialized()
public java.lang.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).
public java.lang.String toString()
toString
in class java.lang.Object