Class AbstractAspectJAdvisorFactory

  • All Implemented Interfaces:
    AspectJAdvisorFactory
    Direct Known Subclasses:
    ReflectiveAspectJAdvisorFactory

    public abstract class AbstractAspectJAdvisorFactory
    extends Object
    implements 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.

    Since:
    2.0
    Author:
    Rod Johnson, Adrian Colyer, Juergen Hoeller
    • Method Detail

      • isAspect

        public boolean isAspect​(Class<?> clazz)
        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.
        Specified by:
        isAspect in interface AspectJAdvisorFactory
        Parameters:
        clazz - the supposed annotation-style AspectJ class
        Returns:
        whether or not this class is recognized by AspectJ as an aspect class