Class SingletonMetadataAwareAspectInstanceFactory
java.lang.Object
org.springframework.aop.aspectj.SingletonAspectInstanceFactory
org.springframework.aop.aspectj.annotation.SingletonMetadataAwareAspectInstanceFactory
- All Implemented Interfaces:
- Serializable,- MetadataAwareAspectInstanceFactory,- AspectInstanceFactory,- Ordered
public class SingletonMetadataAwareAspectInstanceFactory
extends SingletonAspectInstanceFactory
implements MetadataAwareAspectInstanceFactory, Serializable
Implementation of 
MetadataAwareAspectInstanceFactory that is backed
 by a specified singleton object, returning the same instance for every
 SingletonAspectInstanceFactory.getAspectInstance() call.- Since:
- 2.0
- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
- 
Field SummaryFields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructorsConstructorDescriptionSingletonMetadataAwareAspectInstanceFactory(Object aspectInstance, String aspectName) Create a new SingletonMetadataAwareAspectInstanceFactory for the given aspect.
- 
Method SummaryModifier and TypeMethodDescriptionReturn the best possible creation mutex for this factory.final AspectMetadataReturn the AspectJ AspectMetadata for this factory's aspect.protected intgetOrderForAspectClass(Class<?> aspectClass) Determine a fallback order for the case that the aspect instance does not express an instance-specific order through implementing theOrderedinterface.Methods inherited from class org.springframework.aop.aspectj.SingletonAspectInstanceFactorygetAspectClassLoader, getAspectInstance, getOrderMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.aop.aspectj.AspectInstanceFactorygetAspectClassLoader, getAspectInstance
- 
Constructor Details- 
SingletonMetadataAwareAspectInstanceFactoryCreate a new SingletonMetadataAwareAspectInstanceFactory for the given aspect.- Parameters:
- aspectInstance- the singleton aspect instance
- aspectName- the name of the aspect
 
 
- 
- 
Method Details- 
getAspectMetadataDescription copied from interface:MetadataAwareAspectInstanceFactoryReturn the AspectJ AspectMetadata for this factory's aspect.- Specified by:
- getAspectMetadatain interface- MetadataAwareAspectInstanceFactory
- Returns:
- the aspect metadata
 
- 
getAspectCreationMutexDescription copied from interface:MetadataAwareAspectInstanceFactoryReturn the best possible creation mutex for this factory.- Specified by:
- getAspectCreationMutexin interface- MetadataAwareAspectInstanceFactory
- Returns:
- the mutex object (may be nullfor no mutex to use)
 
- 
getOrderForAspectClassDescription copied from class:SingletonAspectInstanceFactoryDetermine a fallback order for the case that the aspect instance does not express an instance-specific order through implementing theOrderedinterface.The default implementation simply returns Ordered.LOWEST_PRECEDENCE.- Overrides:
- getOrderForAspectClassin class- SingletonAspectInstanceFactory
- Parameters:
- aspectClass- the aspect class
 
 
-