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

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.

Author
Rod Johnson

Author
Adrian Colyer

Author
Juergen Hoeller

Since
2.0

Constructors

<init>

AbstractAspectJAdvisorFactory()

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.

Functions

isAspect

open fun isAspect(clazz: Class<*>): Boolean

We consider something to be an AspectJ aspect suitable for use by the Spring AOP system if it has the @Aspect annotation, and was not compiled by ajc. The reason for this latter test is that aspects written in the code-style (AspectJ language) also have the annotation present when compiled by ajc with the -1.5 flag, yet they cannot be consumed by Spring AOP.

validate

open fun validate(aspectClass: Class<*>): Unit

Inheritors

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.