类 LazySingletonAspectInstanceFactoryDecorator
- java.lang.Object
- org.springframework.aop.aspectj.annotation.LazySingletonAspectInstanceFactoryDecorator
public class LazySingletonAspectInstanceFactoryDecorator extends Object implements MetadataAwareAspectInstanceFactory, Serializable
Decorator to cause aMetadataAwareAspectInstanceFactory
to instantiate only once.- 从以下版本开始:
- 2.0
- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
- 序列化表格
字段概要
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
构造器概要
构造器 构造器 说明 LazySingletonAspectInstanceFactoryDecorator(MetadataAwareAspectInstanceFactory maaif)
Create a new lazily initializing decorator for the given AspectInstanceFactory.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 ClassLoader
getAspectClassLoader()
Expose the aspect class loader that this factory uses.Object
getAspectCreationMutex()
Return the best possible creation mutex for this factory.Object
getAspectInstance()
Create an instance of this factory's aspect.AspectMetadata
getAspectMetadata()
Return the AspectJ AspectMetadata for this factory's aspect.int
getOrder()
Get the order value of this object.boolean
isMaterialized()
String
toString()
构造器详细资料
LazySingletonAspectInstanceFactoryDecorator
public LazySingletonAspectInstanceFactoryDecorator(MetadataAwareAspectInstanceFactory maaif)
Create a new lazily initializing decorator for the given AspectInstanceFactory.- 参数:
maaif
- the MetadataAwareAspectInstanceFactory to decorate
方法详细资料
getAspectInstance
public Object getAspectInstance()
从接口复制的说明:AspectInstanceFactory
Create an instance of this factory's aspect.- 指定者:
getAspectInstance
在接口中AspectInstanceFactory
- 返回:
- the aspect instance (never
null
)
isMaterialized
public boolean isMaterialized()
getAspectClassLoader
public ClassLoader getAspectClassLoader()
从接口复制的说明:AspectInstanceFactory
Expose the aspect class loader that this factory uses.- 指定者:
getAspectClassLoader
在接口中AspectInstanceFactory
- 返回:
- the aspect class loader (never
null
)
getAspectMetadata
public AspectMetadata getAspectMetadata()
从接口复制的说明:MetadataAwareAspectInstanceFactory
Return the AspectJ AspectMetadata for this factory's aspect.- 指定者:
getAspectMetadata
在接口中MetadataAwareAspectInstanceFactory
- 返回:
- the aspect metadata
getAspectCreationMutex
public Object getAspectCreationMutex()
从接口复制的说明:MetadataAwareAspectInstanceFactory
Return the best possible creation mutex for this factory.- 指定者:
getAspectCreationMutex
在接口中MetadataAwareAspectInstanceFactory
- 返回:
- the mutex object (may be
null
for no mutex to use)
getOrder
public int getOrder()
从接口复制的说明:Ordered
Get the order value of this object.Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet
load-on-startup
values).Same order values will result in arbitrary sort positions for the affected objects.
- 指定者:
getOrder
在接口中Ordered
- 返回:
- the order value
- 另请参阅:
Ordered.HIGHEST_PRECEDENCE
,Ordered.LOWEST_PRECEDENCE