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

public Class SimpleAspectInstanceFactory

extends Object
implements AspectInstanceFactory
Class Inheritance
All Implemented Interfaces
org.springframework.aop.aspectj.AspectInstanceFactory, org.springframework.core.Ordered
Known Direct Subclasses
org.springframework.aop.aspectj.annotation.SimpleMetadataAwareAspectInstanceFactory
Imports
java.lang.reflect.InvocationTargetException, org.springframework.aop.framework.AopConfigException, org.springframework.core.Ordered, org.springframework.lang.Nullable, org.springframework.util.Assert, .ReflectionUtils

Implementation of AspectInstanceFactory that creates a new instance of the specified aspect class for every getAspectInstance() call.
Author
Juergen Hoeller
Since
2.0.4

Field Summary

Modifier and TypeField and Description
private final Class<?>

Constructor Summary

AccessConstructor and Description
public
SimpleAspectInstanceFactory(Class<?>
the aspect class
aspectClass
)

Create a new SimpleAspectInstanceFactory for the given aspect class.

Method Summary

Modifier and TypeMethod and Description
public final Class<?>
getAspectClass()

Return the specified aspect class (never null).

public ClassLoader
getAspectClassLoader()

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

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

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

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

Implements org.springframework.core.Ordered.getOrder.

Determine the order for this factory's aspect instance, either an instance-specific order expressed through implementing the org.springframework.core.Ordered interface, or a fallback order.
protected int
getOrderForAspectClass(Class<?>
the aspect class
aspectClass
)

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 java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aspectClassback to summary
private final Class<?> aspectClass

Constructor Detail

SimpleAspectInstanceFactoryback to summary
public SimpleAspectInstanceFactory(Class<?> aspectClass)

Create a new SimpleAspectInstanceFactory for the given aspect class.

Parameters
aspectClass:Class<?>

the aspect class

Method Detail

getAspectClassback to summary
public final Class<?> getAspectClass()

Return the specified aspect class (never null).

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
getAspectInstanceback to summary
public final 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
getOrderback to summary
public int getOrder()

Implements org.springframework.core.Ordered.getOrder.

Determine the order for this factory's aspect instance, either an instance-specific order expressed through implementing the org.springframework.core.Ordered interface, or a fallback order.

Returns:int

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

the order value

Annotations
@Override
See Also
org.springframework.core.Ordered, getOrderForAspectClass
getOrderForAspectClassback to summary
protected int getOrderForAspectClass(Class<?> aspectClass)

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