The Spring Framework

org.springframework.aop.aspectj
Class SingletonAspectInstanceFactory

java.lang.Object
  extended by org.springframework.aop.aspectj.SingletonAspectInstanceFactory
All Implemented Interfaces:
AspectInstanceFactory
Direct Known Subclasses:
SingletonMetadataAwareAspectInstanceFactory

public class SingletonAspectInstanceFactory
extends Object
implements AspectInstanceFactory

Simple implementation of AspectInstanceFactory backed by a singleton.

Since:
2.0
Author:
Rod Johnson

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

Constructor Detail

SingletonAspectInstanceFactory

public SingletonAspectInstanceFactory(Object aspectInstance)
Method Detail

getAspectInstance

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

Specified by:
getAspectInstance in interface AspectInstanceFactory

getInstantiationCount

public final 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

The Spring Framework

Copyright © 2002-2006 The Spring Framework.