public class SingletonMetadataAwareAspectInstanceFactory extends SingletonAspectInstanceFactory implements MetadataAwareAspectInstanceFactory, java.io.Serializable
MetadataAwareAspectInstanceFactory that is backed
by a specified singleton object, returning the same instance for every
SingletonAspectInstanceFactory.getAspectInstance() call.SimpleMetadataAwareAspectInstanceFactory,
Serialized Form| Constructor and Description |
|---|
SingletonMetadataAwareAspectInstanceFactory(java.lang.Object aspectInstance,
java.lang.String aspectName)
Create a new SingletonMetadataAwareAspectInstanceFactory for the given aspect.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getAspectCreationMutex()
Return the best possible creation mutex for this factory.
|
AspectMetadata |
getAspectMetadata()
Return the AspectJ AspectMetadata for this factory's aspect.
|
protected int |
getOrderForAspectClass(java.lang.Class<?> aspectClass)
Determine a fallback order for the case that the aspect instance
does not express an instance-specific order through implementing
the
Ordered interface. |
getAspectClassLoader, getAspectInstance, getOrderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAspectClassLoader, getAspectInstancepublic SingletonMetadataAwareAspectInstanceFactory(java.lang.Object aspectInstance,
java.lang.String aspectName)
aspectInstance - the singleton aspect instanceaspectName - the name of the aspectpublic final AspectMetadata getAspectMetadata()
MetadataAwareAspectInstanceFactorygetAspectMetadata in interface MetadataAwareAspectInstanceFactorypublic java.lang.Object getAspectCreationMutex()
MetadataAwareAspectInstanceFactorygetAspectCreationMutex in interface MetadataAwareAspectInstanceFactorynull for no mutex to use)protected int getOrderForAspectClass(java.lang.Class<?> aspectClass)
SingletonAspectInstanceFactoryOrdered interface.
The default implementation simply returns Ordered.LOWEST_PRECEDENCE.
getOrderForAspectClass in class SingletonAspectInstanceFactoryaspectClass - the aspect class