Top Description Fields Constructors Methods
org.springframework.aop.config

public Class SimpleBeanFactoryAwareAspectInstanceFactory

extends Object
implements AspectInstanceFactory, BeanFactoryAware
Class Inheritance
All Implemented Interfaces
org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.Aware, org.springframework.aop.aspectj.AspectInstanceFactory, org.springframework.core.Ordered
Imports
org.springframework.aop.aspectj.AspectInstanceFactory, org.springframework.beans.factory.BeanFactory, .BeanFactoryAware, org.springframework.beans.factory.config.ConfigurableBeanFactory, org.springframework.core.Ordered, org.springframework.lang.Nullable, org.springframework.util.Assert, .ClassUtils

Implementation of AspectInstanceFactory that locates the aspect from the org.springframework.beans.factory.BeanFactory using a configured bean name.
Authors
Rob Harrop, Juergen Hoeller
Since
2.0

Field Summary

Modifier and TypeField and Description
private String
private BeanFactory

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ClassLoader
getAspectClassLoader()

Implements org.springframework.aop.aspectj.AspectInstanceFactory.getAspectClassLoader.

Expose the aspect class loader that this factory uses.
public Object
public int
getOrder()

Implements org.springframework.core.Ordered.getOrder.

Get the order value of this object.
public void
setAspectBeanName(String aspectBeanName)

Set the name of the aspect bean.

public void
setBeanFactory(BeanFactory
owning BeanFactory (never null). The bean can immediately call methods on the factory.
beanFactory
)

Implements org.springframework.beans.factory.BeanFactoryAware.setBeanFactory.

Callback that supplies the owning factory to a bean instance.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aspectBeanNameback to summary
private String aspectBeanName
Annotations
@Nullable
beanFactoryback to summary
private BeanFactory beanFactory
Annotations
@Nullable

Constructor Detail

SimpleBeanFactoryAwareAspectInstanceFactoryback to summary
public SimpleBeanFactoryAwareAspectInstanceFactory()

Method Detail

getAspectClassLoaderback to summary
public ClassLoader getAspectClassLoader()

Implements org.springframework.aop.aspectj.AspectInstanceFactory.getAspectClassLoader.

Doc from org.springframework.aop.aspectj.AspectInstanceFactory.getAspectClassLoader.

Expose the aspect class loader that this factory uses.

Returns:ClassLoader

the aspect class loader (or null for the bootstrap loader)

Annotations
@Override
@Nullable
getAspectInstanceback to summary
public Object getAspectInstance()

Implements org.springframework.aop.aspectj.AspectInstanceFactory.getAspectInstance.

Look up the aspect bean from the BeanFactory and return it.

Returns:Object

Doc from org.springframework.aop.aspectj.AspectInstanceFactory.getAspectInstance.

the aspect instance (never null)

Annotations
@Override
See Also
setAspectBeanName
getOrderback to summary
public int getOrder()

Implements org.springframework.core.Ordered.getOrder.

Doc from org.springframework.core.Ordered.getOrder.

Get the order value of this object.

Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet load-on-startup values).

Same order values will result in arbitrary sort positions for the affected objects.

Returns:int

the order value

Annotations
@Override
setAspectBeanNameback to summary
public void setAspectBeanName(String aspectBeanName)

Set the name of the aspect bean. This is the bean that is returned when calling getAspectInstance().

setBeanFactoryback to summary
public void setBeanFactory(BeanFactory beanFactory)

Implements org.springframework.beans.factory.BeanFactoryAware.setBeanFactory.

Doc from org.springframework.beans.factory.BeanFactoryAware.setBeanFactory.

Callback that supplies the owning factory to a bean instance.

Invoked after the population of normal bean properties but before an initialization callback such as InitializingBean#afterPropertiesSet() or a custom init-method.

Parameters
beanFactory:BeanFactory

owning BeanFactory (never null). The bean can immediately call methods on the factory.

Annotations
@Override