Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.aop.aspectj.annotation
Class SingletonMetadataAwareAspectInstanceFactory

    java.lang.Object
      org.springframework.aop.aspectj.SingletonAspectInstanceFactory
          org.springframework.aop.aspectj.annotation.SingletonMetadataAwareAspectInstanceFactory

All Implemented Interfaces:
  MetadataAwareAspectInstanceFactory, AspectInstanceFactory, Ordered

    public class SingletonMetadataAwareAspectInstanceFactory

extends SingletonAspectInstanceFactory
implements MetadataAwareAspectInstanceFactory

Implementation of `MetadataAwareAspectInstanceFactory` that is backed by a specified singleton object, returning the same instance for every `SingletonAspectInstanceFactory.getAspectInstance()` call.

Since:
  2.0
Author:
  Rod Johnson, Juergen Hoeller
See Also:
  `SimpleMetadataAwareAspectInstanceFactory`

Field Summary

Fields inherited from interface org.springframework.core.Ordered
`HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

Constructor Summary
`SingletonMetadataAwareAspectInstanceFactory(java.lang.Object aspectInstance, java.lang.String aspectName)` Create a new SingletonMetadataAwareAspectInstanceFactory for the given aspect.

Method Summary
`AspectMetadata` | `getAspectMetadata()` Return the AspectJ AspectMetadata for this factory's aspect.
`protected int` | `getOrderForAspectClass(java.lang.Class<?> aspectClass)` Check whether the aspect class carries an `Order` annotation, falling back to `Ordered.LOWEST_PRECEDENCE`.

Methods inherited from class org.springframework.aop.aspectj.SingletonAspectInstanceFactory
`getAspectClassLoader, getAspectInstance, getOrder`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.springframework.aop.aspectj.AspectInstanceFactory
`getAspectClassLoader, getAspectInstance`

Methods inherited from interface org.springframework.core.Ordered
`getOrder`

Constructor Detail

### SingletonMetadataAwareAspectInstanceFactory

    public SingletonMetadataAwareAspectInstanceFactory(java.lang.Object aspectInstance,
                                                       java.lang.String aspectName)

  Create a new SingletonMetadataAwareAspectInstanceFactory for the given aspect.

  Parameters:
    `aspectInstance` - the singleton aspect instance
    `aspectName` - the name of the aspect

Method Detail

### getAspectMetadata

    public final AspectMetadata getAspectMetadata()

  Description copied from interface: `MetadataAwareAspectInstanceFactory`
  Return the AspectJ AspectMetadata for this factory's aspect.

  Specified by:
    `getAspectMetadata` in interface `MetadataAwareAspectInstanceFactory`
  Returns:
    the aspect metadata

### getOrderForAspectClass

    protected int getOrderForAspectClass(java.lang.Class<?> aspectClass)

  Check whether the aspect class carries an `Order` annotation, falling back to `Ordered.LOWEST_PRECEDENCE`.

  Overrides:
    `getOrderForAspectClass` in class `SingletonAspectInstanceFactory`
  Parameters:
    `aspectClass` - the aspect class
  See Also:
    `Order`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD