public class

LazySingletonAspectInstanceFactoryDecorator

extends Object
implements MetadataAwareAspectInstanceFactory
java.lang.Object
   ↳ org.springframework.aop.aspectj.annotation.LazySingletonAspectInstanceFactoryDecorator

Class Overview

Decorator to cause a MetadataAwareAspectInstanceFactory to instantiate only once.

Summary

[Expand]
Inherited Constants
From interface org.springframework.core.Ordered
Public Constructors
LazySingletonAspectInstanceFactoryDecorator(MetadataAwareAspectInstanceFactory maaif)
Create a new lazily initializing decorator for the given AspectInstanceFactory.
Public Methods
ClassLoader getAspectClassLoader()
Expose the aspect class loader that this factory uses.
synchronized Object getAspectInstance()
Create an instance of this factory's aspect.
AspectMetadata getAspectMetadata()
Return the AspectJ AspectMetadata for this factory's aspect.
int getOrder()
Return the order value of this object, with a higher value meaning greater in terms of sorting.
boolean isMaterialized()
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.aop.aspectj.AspectInstanceFactory
From interface org.springframework.aop.aspectj.annotation.MetadataAwareAspectInstanceFactory
From interface org.springframework.core.Ordered

Public Constructors

public LazySingletonAspectInstanceFactoryDecorator (MetadataAwareAspectInstanceFactory maaif)

Create a new lazily initializing decorator for the given AspectInstanceFactory.

Parameters
maaif the MetadataAwareAspectInstanceFactory to decorate

Public Methods

public ClassLoader getAspectClassLoader ()

Expose the aspect class loader that this factory uses.

Returns
  • the aspect class loader (never null)

public synchronized Object getAspectInstance ()

Create an instance of this factory's aspect.

Returns
  • the aspect instance (never null)

public AspectMetadata getAspectMetadata ()

Return the AspectJ AspectMetadata for this factory's aspect.

Returns
  • the aspect metadata

public int getOrder ()

Return the order value of this object, with a higher value meaning greater in terms of sorting.

Normally starting with 0, with Integer.MAX_VALUE indicating the greatest value. Same order values will result in arbitrary positions for the affected objects.

Higher values can be interpreted as lower priority. As a consequence, the object with the lowest value has highest priority (somewhat analogous to Servlet "load-on-startup" values).

Returns
  • the order value

public boolean isMaterialized ()

public String toString ()