spring-framework / org.springframework.aop.aspectj.annotation

Package org.springframework.aop.aspectj.annotation

Types

AbstractAspectJAdvisorFactory

abstract class AbstractAspectJAdvisorFactory : AspectJAdvisorFactory

Abstract base class for factories that can create Spring AOP Advisors given AspectJ classes from classes honoring the AspectJ 5 annotation syntax.

This class handles annotation parsing and validation functionality. It does not actually generate Spring AOP Advisors, which is deferred to subclasses.

AnnotationAwareAspectJAutoProxyCreator

open class AnnotationAwareAspectJAutoProxyCreator : AspectJAwareAdvisorAutoProxyCreator

AspectJAwareAdvisorAutoProxyCreator subclass that processes all AspectJ annotation aspects in the current application context, as well as Spring Advisors.

Any AspectJ annotated classes will automatically be recognized, and their advice applied if Spring AOP's proxy-based model is capable of applying it. This covers method execution joinpoints.

If the <aop:include> element is used, only @AspectJ beans with names matched by an include pattern will be considered as defining aspects to use for Spring auto-proxying.

Processing of Spring Advisors follows the rules established in org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.

AspectJProxyFactory

open class AspectJProxyFactory : ProxyCreatorSupport

AspectJ-based proxy factory, allowing for programmatic building of proxies which include AspectJ aspects (code style as well Java 5 annotation style).

AspectMetadata

open class AspectMetadata : Serializable

Metadata for an AspectJ aspect class, with an additional Spring AOP pointcut for the per clause.

Uses AspectJ 5 AJType reflection API, enabling us to work with different AspectJ instantiation models such as "singleton", "pertarget" and "perthis".

LazySingletonAspectInstanceFactoryDecorator

open class LazySingletonAspectInstanceFactoryDecorator : MetadataAwareAspectInstanceFactory, Serializable

Decorator to cause a MetadataAwareAspectInstanceFactory to instantiate only once.

PrototypeAspectInstanceFactory

open class PrototypeAspectInstanceFactory : BeanFactoryAspectInstanceFactory, Serializable

org.springframework.aop.aspectj.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.

ReflectiveAspectJAdvisorFactory

open class ReflectiveAspectJAdvisorFactory : AbstractAspectJAdvisorFactory, Serializable

Factory that can create Spring AOP Advisors given AspectJ classes from classes honoring the AspectJ 5 annotation syntax, using reflection to invoke the corresponding advice methods.

SimpleMetadataAwareAspectInstanceFactory

open class SimpleMetadataAwareAspectInstanceFactory : SimpleAspectInstanceFactory, MetadataAwareAspectInstanceFactory

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

SingletonMetadataAwareAspectInstanceFactory

open class SingletonMetadataAwareAspectInstanceFactory : SingletonAspectInstanceFactory, MetadataAwareAspectInstanceFactory, Serializable

Implementation of MetadataAwareAspectInstanceFactory that is backed by a specified singleton object, returning the same instance for every #getAspectInstance() call.

Exceptions

NotAnAtAspectException

open class NotAnAtAspectException : AopConfigException

Extension of AopConfigException thrown when trying to perform an advisor generation operation on a class that is not an AspectJ annotation-style aspect.