Class DeclareParentsAdvisor

    • Constructor Detail

      • DeclareParentsAdvisor

        public DeclareParentsAdvisor​(Class<?> interfaceType,
                                     String typePattern,
                                     Class<?> defaultImpl)
        Create a new advisor for this DeclareParents field.
        Parameters:
        interfaceType - static field defining the introduction
        typePattern - type pattern the introduction is restricted to
        defaultImpl - the default implementation class
      • DeclareParentsAdvisor

        public DeclareParentsAdvisor​(Class<?> interfaceType,
                                     String typePattern,
                                     Object delegateRef)
        Create a new advisor for this DeclareParents field.
        Parameters:
        interfaceType - static field defining the introduction
        typePattern - type pattern the introduction is restricted to
        delegateRef - the delegate implementation object
    • Method Detail

      • getClassFilter

        public ClassFilter getClassFilter()
        Description copied from interface: IntroductionAdvisor
        Return the filter determining which target classes this introduction should apply to.

        This represents the class part of a pointcut. Note that method matching doesn't make sense to introductions.

        Specified by:
        getClassFilter in interface IntroductionAdvisor
        Returns:
        the class filter
      • isPerInstance

        public boolean isPerInstance()
        Description copied from interface: Advisor
        Return whether this advice is associated with a particular instance (for example, creating a mixin) or shared with all instances of the advised class obtained from the same Spring bean factory.

        Note that this method is not currently used by the framework. Typical Advisor implementations always return true. Use singleton/prototype bean definitions or appropriate programmatic proxy creation to ensure that Advisors have the correct lifecycle model.

        Specified by:
        isPerInstance in interface Advisor
        Returns:
        whether this advice is associated with a particular target instance