public class ConfigurationWrapper extends Object implements Configuration
| Modifier and Type | Field and Description |
|---|---|
protected Map<Class<?>,Map<Class<?>,Integer>> |
localClassContracts |
| Constructor and Description |
|---|
ConfigurationWrapper(Configuration delegate) |
| Modifier and Type | Method and Description |
|---|---|
Set<Class<?>> |
getClasses()
Get the immutable set of registered component (such as provider or
feature) classes to be instantiated, injected and utilized in the scope
of the configurable instance. |
Map<Class<?>,Integer> |
getContracts(Class<?> componentClass)
Get the extension contract registration information for a component of a given class.
|
Set<Object> |
getInstances()
Get the immutable set of registered component (such as provider or
feature) instances to be utilized by the configurable instance. |
Map<String,Object> |
getProperties()
Get the immutable bag of configuration properties.
|
Object |
getProperty(String name)
Get the value for the property with a given name.
|
Collection<String> |
getPropertyNames()
Returns an immutable
collection containing the
property names available within the context of the current configuration instance. |
RuntimeType |
getRuntimeType()
Get the runtime type of this configuration context.
|
boolean |
isEnabled(Class<? extends Feature> featureClass)
Check if a
feature instance of featureClass class has been
previously enabled in the runtime configuration context. |
boolean |
isEnabled(Feature feature)
Check if a particular
feature instance has been previously
enabled in the runtime configuration context. |
boolean |
isRegistered(Class<?> componentClass)
Check if a component of the supplied
componentClass class has been previously
registered in the runtime configuration context. |
boolean |
isRegistered(Object component)
Check if a particular API
component instance (such as providers or
features) has been previously registered in the runtime configuration context. |
void |
registerLocalContract(Class<?> provider,
Map<Class<?>,Integer> contracts) |
public ConfigurationWrapper(Configuration delegate)
public RuntimeType getRuntimeType()
ConfigurationgetRuntimeType in interface Configurationpublic Map<String,Object> getProperties()
ConfigurationgetProperties in interface Configurationpublic Object getProperty(String name)
ConfigurationgetProperty in interface Configurationname - property name.null
if the property with such name is not configured.public Collection<String> getPropertyNames()
Configurationcollection containing the
property names available within the context of the current configuration instance.
Use the Configuration.getProperty(java.lang.String) method with a property name to get the value of
a property.
getPropertyNames in interface Configurationcollection of property names.Configuration.getProperty(java.lang.String)public boolean isEnabled(Feature feature)
Configurationfeature instance has been previously
enabled in the runtime configuration context.
Method returns true only in case an instance equal to the feature
instance is already present among the features previously successfully enabled in
the configuration context.
isEnabled in interface Configurationfeature - a feature instance to test for.true if the feature instance has been previously enabled in this
configuration context, false otherwise.public boolean isEnabled(Class<? extends Feature> featureClass)
Configurationfeature instance of featureClass class has been
previously enabled in the runtime configuration context.
Method returns true in case any instance of the featureClass class is
already present among the features previously successfully enabled in the configuration
context.
isEnabled in interface ConfigurationfeatureClass - a feature class to test for.true if a feature of a given class has been previously enabled in this
configuration context, false otherwise.public boolean isRegistered(Object component)
Configurationcomponent instance (such as providers or
features) has been previously registered in the runtime configuration context.
Method returns true only in case an instance equal to the component
instance is already present among the components previously registered in the configuration
context.
isRegistered in interface Configurationcomponent - a component instance to test for.true if the component instance has been previously registered in this
configuration context, false otherwise.Configuration.isEnabled(Feature)public boolean isRegistered(Class<?> componentClass)
ConfigurationcomponentClass class has been previously
registered in the runtime configuration context.
Method returns true in case a component of the supplied componentClass class
is already present among the previously registered component classes or instances
in the configuration context.
isRegistered in interface ConfigurationcomponentClass - a component class to test for.true if a component of a given class has been previously registered in this
configuration context, false otherwise.Configuration.isEnabled(Class)public Map<Class<?>,Integer> getContracts(Class<?> componentClass)
ConfigurationMap. Method does not return null.getContracts in interface Configurationpublic Set<Class<?>> getClasses()
Configurationfeature) classes to be instantiated, injected and utilized in the scope
of the configurable instance.
For each component type, there can be only a single class-based or instance-based registration present in the configuration context at any given time.
getClasses in interface Configurationnull.Configuration.getInstances()public Set<Object> getInstances()
Configurationfeature) instances to be utilized by the configurable instance.
Fields and properties of returned instances are injected with their declared dependencies
(see Context) by the runtime prior to use.
For each component type, there can be only a single class-based or instance-based registration present in the configuration context at any given time.
getInstances in interface Configurationnull.Configuration.getClasses()Copyright © 2019 JBoss by Red Hat. All rights reserved.