Package org.springframework.aop.aspectj.annotation

# Class PrototypeAspectInstanceFactory

java.lang.Object
org.springframework.aop.aspectj.annotation.BeanFactoryAspectInstanceFactory
org.springframework.aop.aspectj.annotation.PrototypeAspectInstanceFactory

All Implemented Interfaces:
  `Serializable`, `MetadataAwareAspectInstanceFactory`, `AspectInstanceFactory`, `org.springframework.core.Ordered`

public class PrototypeAspectInstanceFactory extends BeanFactoryAspectInstanceFactory implements Serializable
`AspectInstanceFactory` backed by a `BeanFactory`-provided prototype, enforcing prototype semantics.

Note that this may instantiate multiple times, which probably won't give the semantics you expect. Use a `LazySingletonAspectInstanceFactoryDecorator` to wrap this to ensure only one new aspect comes back.

Since:
  2.0
Author:
  Rod Johnson, Juergen Hoeller
See Also:
  - `BeanFactory`
  - `LazySingletonAspectInstanceFactoryDecorator`
  - Serialized Form

## Field Summary

### Fields inherited from interface org.springframework.core.Ordered

`HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

## Constructor Summary

Constructors
Constructor
Description
`PrototypeAspectInstanceFactory(org.springframework.beans.factory.BeanFactory beanFactory, String name)`
Create a PrototypeAspectInstanceFactory.

## Method Summary

### Methods inherited from class org.springframework.aop.aspectj.annotation.BeanFactoryAspectInstanceFactory

`getAspectClassLoader, getAspectCreationMutex, getAspectInstance, getAspectMetadata, getOrder, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### PrototypeAspectInstanceFactory

public PrototypeAspectInstanceFactory(org.springframework.beans.factory.BeanFactory beanFactory, String name)
Create a PrototypeAspectInstanceFactory. AspectJ will be called to introspect to create AJType metadata using the type returned for the given bean name from the BeanFactory.

Parameters:
  `beanFactory` - the BeanFactory to obtain instance(s) from
  `name` - the name of the bean