public class

SimpleMetadataAwareAspectInstanceFactory

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

Class Overview

Implementation of MetadataAwareAspectInstanceFactory that creates a new instance of the specified aspect class for every getAspectInstance() call.

Summary

[Expand]
Inherited Constants
From interface org.springframework.core.Ordered
Public Constructors
SimpleMetadataAwareAspectInstanceFactory(Class aspectClass, String aspectName)
Create a new SimpleMetadataAwareAspectInstanceFactory for the given aspect class.
Public Methods
final AspectMetadata getAspectMetadata()
Return the AspectJ AspectMetadata for this factory's aspect.
Protected Methods
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 Ordered interface.
[Expand]
Inherited Methods
From class org.springframework.aop.aspectj.SimpleAspectInstanceFactory
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 SimpleMetadataAwareAspectInstanceFactory (Class aspectClass, String aspectName)

Create a new SimpleMetadataAwareAspectInstanceFactory for the given aspect class.

Parameters
aspectClass the aspect class
aspectName the aspect name

Public Methods

public final AspectMetadata getAspectMetadata ()

Return the AspectJ AspectMetadata for this factory's aspect.

Returns
  • the aspect metadata

Protected Methods

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 Ordered interface.

The default implementation simply returns Ordered.LOWEST_PRECEDENCE.

Parameters
aspectClass the aspect class