Package net.shibboleth.shared.component

# Class ComponentSupport

java.lang.Object
net.shibboleth.shared.component.ComponentSupport

@Deprecated(forRemoval=true, since="5.0") public final class ComponentSupport extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Support class for working with `Component` objects.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`private`
`ComponentSupport()`
Deprecated, for removal: This API element is subject to removal in a future version.
Constructor.

## Method Summary

Modifier and Type
Method
Description
`static void`
`destroy(Object obj)`
Deprecated, for removal: This API element is subject to removal in a future version.
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)`
Deprecated, for removal: This API element is subject to removal in a future version.
Checks if a component is destroyed and, if so, throws a `DestroyedComponentException`.
`static void`
`ifInitializedThrowUnmodifiabledComponentException(InitializableComponent component)`
Deprecated, for removal: This API element is subject to removal in a future version.
Checks if a component has been initialized and, if so, throws a `UnmodifiableComponentException`.
`static void`
`ifNotInitializedThrowUninitializedComponentException(InitializableComponent component)`
Deprecated, for removal: This API element is subject to removal in a future version.
Checks if a component has not been initialized and, if so, throw)s a `UninitializedComponentException`.
`static void`
`initialize(Object obj)`
Deprecated, for removal: This API element is subject to removal in a future version.
If the given object is not null and an instance of `InitializableComponent`, then this method calls the given object's `InitializableComponent.initialize()` method.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ComponentSupport

private ComponentSupport()
Deprecated, for removal: This API element is subject to removal in a future version.
Constructor.

## Method Details

### destroy

public static void destroy(@Nullable Object obj)
Deprecated, for removal: This API element is subject to removal in a future version.
If the given object is not null and an instance of `DestructableComponent`, then this method calls the given object's `DestructableComponent.destroy()` method.

Parameters:
  `obj` - object to destroy, may be null

### initialize

public static void initialize(@Nullable Object obj) throws ComponentInitializationException
Deprecated, for removal: This API element is subject to removal in a future version.
If the given object is not null and an instance of `InitializableComponent`, then this method calls the given object's `InitializableComponent.initialize()` method.

Parameters:
  `obj` - object to initialize, may be null
Throws:
  `ComponentInitializationException` - thrown if there is a problem initializing the object

### ifDestroyedThrowDestroyedComponentException

public static void ifDestroyedThrowDestroyedComponentException(@Nonnull DestructableComponent component)
Deprecated, for removal: This API element is subject to removal in a future version.
Checks if a component is destroyed and, if so, throws a `DestroyedComponentException`. If the component is also an instance of `IdentifiedComponent`, the component's ID is included in the error message.

Parameters:
  `component` - component to check

### ifNotInitializedThrowUninitializedComponentException

public static void ifNotInitializedThrowUninitializedComponentException(@Nonnull InitializableComponent component)
Deprecated, for removal: This API element is subject to removal in a future version.
Checks if a component has not been initialized and, if so, throw)s a `UninitializedComponentException`. If the component is also an instance of `IdentifiedComponent`, the component's ID is included in the error message.

Parameters:
  `component` - component to check

### ifInitializedThrowUnmodifiabledComponentException

public static void ifInitializedThrowUnmodifiabledComponentException(@Nonnull InitializableComponent component)
Deprecated, for removal: This API element is subject to removal in a future version.
Checks if a component has been initialized and, if so, throws a `UnmodifiableComponentException`. If the component is also an instance of `IdentifiedComponent`, the component's ID is included in the error message.

Parameters:
  `component` - component to check