public class ExtensionSupport extends Object
ExtensionHandler with its supported interfaces. This tuple
is then used as a configuration element for creating and customizing
IBeanFactorys. See ExtensionHandler for a general description
of the ProxyIBeanFactory extension concept. See
ProxyIBeanFactory.Builder.withInterfaceSupport(ExtensionSupport) for where and how to
use ExtensionSupport. ExtensionSupport instances are created
via constructor ExtensionSupport(Class, Class, boolean) and are then
immutable.| Constructor and Description |
|---|
ExtensionSupport(Class<?> supportedInterface,
Class<? extends ExtensionHandler> handlerType,
boolean handlerStateful)
Creates a new immutable
ExtensionSupport. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
handlerStateful()
Returns
true if the handler is stateful and needs to have an
individual instance per IBean object. |
Class<? extends ExtensionHandler> |
handlerType()
Provides the
ExtensionHandler implementation responsible for the
supported interface. |
Class<?> |
supportedInterface()
Provides the interface that is covered by the corresponding handler.
|
List<Class<?>> |
supportedInterfaceAndSuperInterfaces()
Returns the
supportedInterface() together with all
sub-interfaces of that interface. |
public ExtensionSupport(Class<?> supportedInterface, Class<? extends ExtensionHandler> handlerType, boolean handlerStateful)
ExtensionSupport.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.public Class<?> supportedInterface()
public Class<? extends ExtensionHandler> handlerType()
ExtensionHandler implementation responsible for the
supported interface.ExtensionHandler implementationpublic boolean handlerStateful()
true if the handler is stateful and needs to have an
individual instance per IBean object.false if a single handler instance can handle all
bean objectspublic List<Class<?>> supportedInterfaceAndSuperInterfaces()
supportedInterface() together with all
sub-interfaces of that interface.null but might be
empty.