Top Description Fields Constructors Methods
org.springframework.aop.aspectj.annotation

public Class SingletonMetadataAwareAspectInstanceFactory

extends SingletonAspectInstanceFactory
implements MetadataAwareAspectInstanceFactory, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.springframework.aop.aspectj.annotation.MetadataAwareAspectInstanceFactory, org.springframework.aop.aspectj.AspectInstanceFactory, org.springframework.core.Ordered
Annotations
@SuppressWarnings:serial
Imports
java.io.Serializable, org.springframework.aop.aspectj.SingletonAspectInstanceFactory, org.springframework.core.Ordered, org.springframework.core.annotation.OrderUtils

Implementation of MetadataAwareAspectInstanceFactory that is backed by a specified singleton object, returning the same instance for every getAspectInstance() call.
Authors
Rod Johnson, Juergen Hoeller
Since
2.0
See Also
SimpleMetadataAwareAspectInstanceFactory

Field Summary

Modifier and TypeField and Description
private final AspectMetadata

Constructor Summary

AccessConstructor and Description
public
SingletonMetadataAwareAspectInstanceFactory(Object
the singleton aspect instance
aspectInstance
,
String
the name of the aspect
aspectName
)

Create a new SingletonMetadataAwareAspectInstanceFactory for the given aspect.

Method Summary

Modifier and TypeMethod and Description
public Object
public final AspectMetadata
protected int
getOrderForAspectClass(Class<?>
the aspect class
aspectClass
)

Overrides org.springframework.aop.aspectj.SingletonAspectInstanceFactory.getOrderForAspectClass.

Determine a fallback order for the case that the aspect instance does not express an instance-specific order through implementing the org.springframework.core.Ordered interface.

Inherited from org.springframework.aop.aspectj.SingletonAspectInstanceFactory:
getAspectClassLoadergetAspectInstancegetOrder

Field Detail

metadataback to summary
private final AspectMetadata metadata

Constructor Detail

SingletonMetadataAwareAspectInstanceFactoryback to summary
public SingletonMetadataAwareAspectInstanceFactory(Object aspectInstance, String aspectName)

Create a new SingletonMetadataAwareAspectInstanceFactory for the given aspect.

Parameters
aspectInstance:Object

the singleton aspect instance

aspectName:String

the name of the aspect

Method Detail

getAspectCreationMutexback to summary
public Object getAspectCreationMutex()

Implements org.springframework.aop.aspectj.annotation.MetadataAwareAspectInstanceFactory.getAspectCreationMutex.

Doc from org.springframework.aop.aspectj.annotation.MetadataAwareAspectInstanceFactory.getAspectCreationMutex.

Get the best possible creation mutex for this factory.

Returns:Object

the mutex object (may be null for no mutex to use)

Annotations
@Override
getAspectMetadataback to summary
public final AspectMetadata getAspectMetadata()

Implements org.springframework.aop.aspectj.annotation.MetadataAwareAspectInstanceFactory.getAspectMetadata.

Doc from org.springframework.aop.aspectj.annotation.MetadataAwareAspectInstanceFactory.getAspectMetadata.

Get the AspectJ AspectMetadata for this factory's aspect.

Returns:AspectMetadata

the aspect metadata

Annotations
@Override
getOrderForAspectClassback to summary
protected int getOrderForAspectClass(Class<?> aspectClass)

Overrides org.springframework.aop.aspectj.SingletonAspectInstanceFactory.getOrderForAspectClass.

Doc from org.springframework.aop.aspectj.SingletonAspectInstanceFactory.getOrderForAspectClass.

Determine a fallback order for the case that the aspect instance does not express an instance-specific order through implementing the org.springframework.core.Ordered interface.

The default implementation simply returns Ordered.LOWEST_PRECEDENCE.

Parameters
aspectClass:Class<?>

the aspect class

Annotations
@Override