The Spring Framework

org.springframework.aop.aspectj.annotation
Class LazySingletonMetadataAwareAspectInstanceFactoryDecorator

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

public class LazySingletonMetadataAwareAspectInstanceFactoryDecorator
extends Object
implements MetadataAwareAspectInstanceFactory

Decorator to cause a MetadataAwareAspectInstanceFactory to instantiate only once.

Since:
2.0
Author:
Rod Johnson

Constructor Summary
LazySingletonMetadataAwareAspectInstanceFactoryDecorator(MetadataAwareAspectInstanceFactory aif)
           
 
Method Summary
 Object getAspectInstance()
          Create an instance of this factory's aspect.
 AspectMetadata getAspectMetadata()
           
 int getInstantiationCount()
          Return the number of instantiations from this factory.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LazySingletonMetadataAwareAspectInstanceFactoryDecorator

public LazySingletonMetadataAwareAspectInstanceFactoryDecorator(MetadataAwareAspectInstanceFactory aif)
Method Detail

getAspectInstance

public Object getAspectInstance()
Description copied from interface: AspectInstanceFactory
Create an instance of this factory's aspect.

Specified by:
getAspectInstance in interface AspectInstanceFactory

getAspectMetadata

public AspectMetadata getAspectMetadata()
Specified by:
getAspectMetadata in interface MetadataAwareAspectInstanceFactory

getInstantiationCount

public int getInstantiationCount()
Description copied from interface: AspectInstanceFactory
Return the number of instantiations from this factory.

Specified by:
getInstantiationCount in interface AspectInstanceFactory
Returns:
the number of aspect instances created

toString

public String toString()
Overrides:
toString in class Object

The Spring Framework

Copyright © 2002-2006 The Spring Framework.