站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

SimpleMetadataAwareAspectInstanceFactory (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.aop.aspectj.annotation
Class SimpleMetadataAwareAspectInstanceFactory

java.lang.Object
  extended by org.springframework.aop.aspectj.SimpleAspectInstanceFactory
      extended by org.springframework.aop.aspectj.annotation.SimpleMetadataAwareAspectInstanceFactory
All Implemented Interfaces:
MetadataAwareAspectInstanceFactory, AspectInstanceFactory, Ordered

public class SimpleMetadataAwareAspectInstanceFactory
extends SimpleAspectInstanceFactory
implements MetadataAwareAspectInstanceFactory

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

Since:
2.0.4
Author:
Juergen Hoeller

Field Summary
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
SimpleMetadataAwareAspectInstanceFactory(Class aspectClass, String aspectName)
          Create a new SimpleMetadataAwareAspectInstanceFactory for the given aspect class.
 
Method Summary
 AspectMetadata getAspectMetadata()
          Return the AspectJ AspectMetadata for this factory's aspect.
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.
 
Methods inherited from class org.springframework.aop.aspectj.SimpleAspectInstanceFactory
getAspectClass, 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
getAspectInstance
 
Methods inherited from interface org.springframework.core.Ordered
getOrder
 

Constructor Detail

SimpleMetadataAwareAspectInstanceFactory

public SimpleMetadataAwareAspectInstanceFactory(Class aspectClass,
                                                String aspectName)
Create a new SimpleMetadataAwareAspectInstanceFactory for the given aspect class.

Parameters:
aspectClass - the aspect class
aspectName - the aspect name
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(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.

Overrides:
getOrderForAspectClass in class SimpleAspectInstanceFactory
Parameters:
aspectClass - the aspect class

The Spring Framework

Copyright © 2002-2007 The Spring Framework.