Class IntroductionInfoSupport

All Implemented Interfaces:
Serializable, IntroductionInfo
Direct Known Subclasses:
DelegatePerTargetObjectIntroductionInterceptor, DelegatingIntroductionInterceptor

public class IntroductionInfoSupport extends Object implements IntroductionInfo, Serializable
Support for implementations of IntroductionInfo.

Allows subclasses to conveniently add all interfaces from a given object, and to suppress interfaces that should not be added. Also allows for querying all introduced interfaces.

Rod Johnson, Juergen Hoeller
See Also:
  • Field Details

    • publishedInterfaces

      protected final Set<Class<?>> publishedInterfaces
  • Constructor Details

    • IntroductionInfoSupport

      public IntroductionInfoSupport()
  • Method Details

    • suppressInterface

      public void suppressInterface(Class<?> ifc)
      Suppress the specified interface, which may have been autodetected due to the delegate implementing it. Call this method to exclude internal interfaces from being visible at the proxy level.

      Does nothing if the interface is not implemented by the delegate.

      ifc - the interface to suppress
    • getInterfaces

      public Class<?>[] getInterfaces()
      Description copied from interface: IntroductionInfo
      Return the additional interfaces introduced by this Advisor or Advice.
      Specified by:
      getInterfaces in interface IntroductionInfo
      the introduced interfaces
    • implementsInterface

      public boolean implementsInterface(Class<?> ifc)
      Check whether the specified interfaces is a published introduction interface.
      ifc - the interface to check
      whether the interface is part of this introduction
    • implementInterfacesOnObject

      protected void implementInterfacesOnObject(Object delegate)
      Publish all interfaces that the given delegate implements at the proxy level.
      delegate - the delegate object
    • isMethodOnIntroducedInterface

      protected final boolean isMethodOnIntroducedInterface(MethodInvocation mi)
      Is this method on an introduced interface?
      mi - the method invocation
      whether the invoked method is on an introduced interface