Class ExtensionSupport

    • Constructor Detail

      • ExtensionSupport

        public ExtensionSupport​(Class<?> supportedInterface,
                                Class<? extends ExtensionHandler> handlerType,
                                boolean handlerStateful)
        Creates a new immutable ExtensionSupport.
        Parameters:
        supportedInterface - specifies the extension interface supported by the ExtensionHandler. Must be a Java interface type.
        handlerType - the ExtensionHandler type responsible for intercepting IBean calls to the extension interface. Must be a sublcass of ExtensionHandler.
        handlerStateful - specifies if the handler is stateful or stateless. If true a handler type will be treated as stateful an a new handler instance will be created for each new IBean instance.
    • Method Detail

      • supportedInterface

        public Class<?> supportedInterface()
        Provides the interface that is covered by the corresponding handler.
        Returns:
        the extension interface type
      • handlerType

        public Class<? extends ExtensionHandler> handlerType()
        Provides the ExtensionHandler implementation responsible for the supported interface.
        Returns:
        the ExtensionHandler implementation
      • handlerStateful

        public boolean handlerStateful()
        Returns true if the handler is stateful and needs to have an individual instance per IBean object.
        Returns:
        false if a single handler instance can handle all bean objects
      • supportedInterfaceAndSuperInterfaces

        public List<Class<?>> supportedInterfaceAndSuperInterfaces()
        Returns the supportedInterface() together with all sub-interfaces of that interface.
        Returns:
        a list of interface types. Never null but might be empty.