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

public Class LazySingletonAspectInstanceFactoryDecorator

extends Object
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.lang.Nullable, org.springframework.util.Assert

Decorator to cause a MetadataAwareAspectInstanceFactory to instantiate only once.
Authors
Rod Johnson, Juergen Hoeller
Since
2.0

Field Summary

Modifier and TypeField and Description
private final MetadataAwareAspectInstanceFactory
private volatile Object

Constructor Summary

AccessConstructor and Description
public
LazySingletonAspectInstanceFactoryDecorator(MetadataAwareAspectInstanceFactory
the MetadataAwareAspectInstanceFactory to decorate
maaif
)

Create a new lazily initializing decorator for the given AspectInstanceFactory.

Method Summary

Modifier and TypeMethod and Description
public ClassLoader
getAspectClassLoader()

Implements org.springframework.aop.aspectj.AspectInstanceFactory.getAspectClassLoader.

Expose the aspect class loader that this factory uses.
public Object
public Object
getAspectInstance()

Implements org.springframework.aop.aspectj.AspectInstanceFactory.getAspectInstance.

Create an instance of this factory's aspect.
public AspectMetadata
public int
getOrder()

Implements org.springframework.core.Ordered.getOrder.

Get the order value of this object.
public boolean
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

maaifback to summary
private final MetadataAwareAspectInstanceFactory maaif
materializedback to summary
private volatile Object materialized
Annotations
@Nullable

Constructor Detail

LazySingletonAspectInstanceFactoryDecoratorback to summary
public LazySingletonAspectInstanceFactoryDecorator(MetadataAwareAspectInstanceFactory maaif)

Create a new lazily initializing decorator for the given AspectInstanceFactory.

Parameters
maaif:MetadataAwareAspectInstanceFactory

the MetadataAwareAspectInstanceFactory to decorate

Method Detail

getAspectClassLoaderback to summary
public ClassLoader getAspectClassLoader()

Implements org.springframework.aop.aspectj.AspectInstanceFactory.getAspectClassLoader.

Doc from org.springframework.aop.aspectj.AspectInstanceFactory.getAspectClassLoader.

Expose the aspect class loader that this factory uses.

Returns:ClassLoader

the aspect class loader (or null for the bootstrap loader)

Annotations
@Override
@Nullable
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
@Nullable
getAspectInstanceback to summary
public Object getAspectInstance()

Implements org.springframework.aop.aspectj.AspectInstanceFactory.getAspectInstance.

Doc from org.springframework.aop.aspectj.AspectInstanceFactory.getAspectInstance.

Create an instance of this factory's aspect.

Returns:Object

the aspect instance (never null)

Annotations
@Override
getAspectMetadataback to summary
public 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
getOrderback to summary
public int getOrder()

Implements org.springframework.core.Ordered.getOrder.

Doc from org.springframework.core.Ordered.getOrder.

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.

Returns:int

the order value

Annotations
@Override
isMaterializedback to summary
public boolean isMaterialized()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override