public class SimpleMetadataAwareAspectInstanceFactory extends SimpleAspectInstanceFactory implements MetadataAwareAspectInstanceFactory
MetadataAwareAspectInstanceFactory
that
creates a new instance of the specified aspect class for every
SimpleAspectInstanceFactory.getAspectInstance()
call.HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
SimpleMetadataAwareAspectInstanceFactory(java.lang.Class<?> aspectClass,
java.lang.String aspectName)
Create a new SimpleMetadataAwareAspectInstanceFactory for the given aspect class.
|
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. |
getAspectClass, getAspectClassLoader, getAspectInstance, getOrder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAspectClassLoader, getAspectInstance
public SimpleMetadataAwareAspectInstanceFactory(java.lang.Class<?> aspectClass, java.lang.String aspectName)
aspectClass
- the aspect classaspectName
- the aspect namepublic final AspectMetadata getAspectMetadata()
MetadataAwareAspectInstanceFactory
getAspectMetadata
in interface MetadataAwareAspectInstanceFactory
public java.lang.Object getAspectCreationMutex()
MetadataAwareAspectInstanceFactory
getAspectCreationMutex
in interface MetadataAwareAspectInstanceFactory
null
for no mutex to use)protected int getOrderForAspectClass(java.lang.Class<?> aspectClass)
SimpleAspectInstanceFactory
Ordered
interface.
The default implementation simply returns Ordered.LOWEST_PRECEDENCE
.
getOrderForAspectClass
in class SimpleAspectInstanceFactory
aspectClass
- the aspect class