类 SingletonMetadataAwareAspectInstanceFactory
- java.lang.Object
- org.springframework.aop.aspectj.SingletonAspectInstanceFactory
- org.springframework.aop.aspectj.annotation.SingletonMetadataAwareAspectInstanceFactory
public class SingletonMetadataAwareAspectInstanceFactory extends SingletonAspectInstanceFactory implements MetadataAwareAspectInstanceFactory, Serializable
Implementation ofMetadataAwareAspectInstanceFactorythat is backed by a specified singleton object, returning the same instance for everySingletonAspectInstanceFactory.getAspectInstance()call.- 从以下版本开始:
- 2.0
- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
SimpleMetadataAwareAspectInstanceFactory, 序列化表格
字段概要
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
构造器概要
构造器 构造器 说明 SingletonMetadataAwareAspectInstanceFactory(Object aspectInstance, String aspectName)Create a new SingletonMetadataAwareAspectInstanceFactory for the given aspect.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 ObjectgetAspectCreationMutex()Return the best possible creation mutex for this factory.AspectMetadatagetAspectMetadata()Return 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.从类继承的方法 org.springframework.aop.aspectj.SingletonAspectInstanceFactory
getAspectClassLoader, getAspectInstance, getOrder
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 org.springframework.aop.aspectj.AspectInstanceFactory
getAspectClassLoader, getAspectInstance
构造器详细资料
SingletonMetadataAwareAspectInstanceFactory
public SingletonMetadataAwareAspectInstanceFactory(Object aspectInstance, String aspectName)
Create a new SingletonMetadataAwareAspectInstanceFactory for the given aspect.- 参数:
aspectInstance- the singleton aspect instanceaspectName- the name of the aspect
方法详细资料
getAspectMetadata
public final AspectMetadata getAspectMetadata()
从接口复制的说明:MetadataAwareAspectInstanceFactoryReturn the AspectJ AspectMetadata for this factory's aspect.- 指定者:
getAspectMetadata在接口中MetadataAwareAspectInstanceFactory- 返回:
- the aspect metadata
getAspectCreationMutex
public Object getAspectCreationMutex()
从接口复制的说明:MetadataAwareAspectInstanceFactoryReturn the best possible creation mutex for this factory.- 指定者:
getAspectCreationMutex在接口中MetadataAwareAspectInstanceFactory- 返回:
- the mutex object (may be
nullfor no mutex to use)
getOrderForAspectClass
protected int getOrderForAspectClass(Class<?> aspectClass)
从类复制的说明: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.- 覆盖:
getOrderForAspectClass在类中SingletonAspectInstanceFactory- 参数:
aspectClass- the aspect class