Interface AspectJAdvisorFactory

    • Method Detail

      • isAspect

        boolean isAspect(java.lang.Class<?> clazz)
        Determine whether or not the given class is an aspect, as reported by AspectJ's AjTypeSystem.

        Will simply return false if the supposed aspect is invalid (such as an extension of a concrete aspect class). Will return true for some aspects that Spring AOP cannot process, such as those with unsupported instantiation models. Use the validate(java.lang.Class<?>) method to handle these cases if necessary.

        clazz - the supposed annotation-style AspectJ class
        whether or not this class is recognized by AspectJ as an aspect class
      • validate

        void validate(java.lang.Class<?> aspectClass)
               throws AopConfigException
        Is the given class a valid AspectJ aspect class?
        aspectClass - the supposed AspectJ annotation-style class to validate
        AopConfigException - if the class is an invalid aspect (which can never be legal)
        NotAnAtAspectException - if the class is not an aspect at all (which may or may not be legal, depending on the context)
      • getAdvisors

        java.util.List<Advisor> getAdvisors(MetadataAwareAspectInstanceFactory aspectInstanceFactory)
        Build Spring AOP Advisors for all annotated At-AspectJ methods on the specified aspect instance.
        aspectInstanceFactory - the aspect instance factory (not the aspect instance itself in order to avoid eager instantiation)
        a list of advisors for this class
      • getAdvisor

        Advisor getAdvisor(java.lang.reflect.Method candidateAdviceMethod,
                                     MetadataAwareAspectInstanceFactory aspectInstanceFactory,
                                     int declarationOrder,
                                     java.lang.String aspectName)
        Build a Spring AOP Advisor for the given AspectJ advice method.
        candidateAdviceMethod - the candidate advice method
        aspectInstanceFactory - the aspect instance factory
        declarationOrder - the declaration order within the aspect
        aspectName - the name of the aspect
        null if the method is not an AspectJ advice method or if it is a pointcut that will be used by other advice but will not create a Spring advice in its own right