Modifier | Constructor and Description |
---|---|
private |
ComponentSupport()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
destroy(Object obj)
If the given object is not null and an instance of
DestructableComponent , then this method calls the
given object's DestructableComponent.destroy() method. |
static void |
ifDestroyedThrowDestroyedComponentException(DestructableComponent component)
Checks if a component is destroyed and, if so, throws a
DestroyedComponentException . |
static void |
ifInitializedThrowUnmodifiabledComponentException(InitializableComponent component)
Checks if a component has been initialized and, if so, throws a
UnmodifiableComponentException . |
static void |
ifNotInitializedThrowUninitializedComponentException(InitializableComponent component)
Checks if a component has not been initialized and, if so, throw)s a
UninitializedComponentException . |
static void |
initialize(Object obj)
If the given object is not null and an instance of
InitializableComponent , then this method calls the
given object's InitializableComponent.initialize() method. |
public static void destroy(@Nullable Object obj)
DestructableComponent
, then this method calls the
given object's DestructableComponent.destroy()
method.obj
- object to destroy, may be nullpublic static void initialize(@Nullable Object obj) throws ComponentInitializationException
InitializableComponent
, then this method calls the
given object's InitializableComponent.initialize()
method.obj
- object to initialize, may be nullComponentInitializationException
- thrown if there is a problem initializing the objectpublic static void ifDestroyedThrowDestroyedComponentException(@Nonnull DestructableComponent component)
DestroyedComponentException
. If the component is
also an instance of IdentifiedComponent
, the component's ID is included in the error message.component
- component to checkpublic static void ifNotInitializedThrowUninitializedComponentException(@Nonnull InitializableComponent component)
UninitializedComponentException
. If
the component is also an instance of IdentifiedComponent
, the component's ID is included in the error
message.component
- component to checkpublic static void ifInitializedThrowUnmodifiabledComponentException(@Nonnull InitializableComponent component)
UnmodifiableComponentException
. If the
component is also an instance of IdentifiedComponent
, the component's ID is included in the error
message.component
- component to checkCopyright © 1999–2016. All rights reserved.