public static class AbstractRegistry.InstanceInformation
extends java.lang.Object
InstanceInformation encapsulates the properties from the
configuration relevant for a component instance. Per component instance a
3-tuple is stored: component type, instantiation mode and implementation
class or implementation object. This class realises the triple (one of the
four fields being null.
Subclasses of the registry may extend this class, and override
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
componentType
The type of the component instance, that is the type name in the
configuration.
|
protected java.lang.Object |
implementation
The object used as implementation for the instance.
|
protected java.lang.String |
implementationClass
The class (full name) which is used as implementation for the instance.
|
protected boolean |
implInitialised
Whether the provided implementation been initialised.
|
protected AbstractRegistry.InstantiationMode |
instantiationMode
How many instances of the instance may exist (0, 1, many).
|
| Modifier | Constructor and Description |
|---|---|
protected |
InstanceInformation(java.lang.String componentType,
AbstractRegistry.InstantiationMode instantiationMode,
java.lang.String implementationClass)
Creates a new 3-tuple with the configured component instance properties
for an instance specified via its implementation class.
|
protected |
InstanceInformation(java.lang.String componentType,
java.lang.Object implementation)
Creates a new 3-tuple with the configured component instance properties
for an instance specified via an injected implementation.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getImplementationClass()
Gets the class (full name) which is used as implementation for the
instance.
|
void |
instantiatedInitialised()
Sets this provided (injected) instance as initialised.
|
boolean |
instantiatedInitRequired()
Whether this instance is provided (injected) as object and has not been
initialised yet.
|
boolean |
isInstantiated()
Gets whether this instance is provided (injected) as object and therefore
need not be created by the registry.
|
protected final java.lang.String componentType
protected final AbstractRegistry.InstantiationMode instantiationMode
protected final java.lang.String implementationClass
null in case the implementation is
provided directly (injected into the configuration).protected final java.lang.Object implementation
null in case no object is
provided but the corresponding implementation class.protected boolean implInitialised
protected InstanceInformation(java.lang.String componentType,
AbstractRegistry.InstantiationMode instantiationMode,
java.lang.String implementationClass)
componentType - The type of the component instance as specified in
the configuration.instantiationMode - The configured instantiation mode of the
corresponding component instance.implementationClass - The implementation (class name) to use for the
component instance which conforms to the corresponding component
type interface.protected InstanceInformation(java.lang.String componentType,
java.lang.Object implementation)
componentType - The type of the component instance as specified in
the configuration.implementation - The object to use for the component instance which
conforms to the corresponding component type interface.public boolean isInstantiated()
public java.lang.String getImplementationClass()
public boolean instantiatedInitRequired()
public void instantiatedInitialised()