public class SystemPropertiesConfigurationModel extends Object implements ExternalConfigurationModel<Void>
System properties. The properties are listed in a property class
 in a form of public static final String property name. The String value of the property name is searched
 among the System properties. The property scan is performed only when
 CommonProperties.ALLOW_SYSTEM_PROPERTIES_PROVIDER is set to true.| Constructor and Description | 
|---|
SystemPropertiesConfigurationModel(List<String> propertyClassNames)
Create new  
ExternalConfigurationModel for properties defined by classes in propertyClassNames list. | 
| Modifier and Type | Method and Description | 
|---|---|
<T> T | 
as(String name,
  Class<T> clazz)
Get value of a property as a definite type
 property shall exist in order for this method to be used. 
 | 
Set<Class<?>> | 
getClasses()  | 
Void | 
getConfig()
Obtain config object 
 | 
Map<Class<?>,Integer> | 
getContracts(Class<?> componentClass)  | 
Set<Object> | 
getInstances()  | 
<T> Optional<T> | 
getOptionalProperty(String name,
                   Class<T> clazz)
Get value of a property as a definite type
 property may not exist, an empty Optional object is returned in case of an empty property 
 | 
Map<String,Object> | 
getProperties()  | 
Object | 
getProperty(String name)  | 
protected List<String> | 
getPropertyClassNames()  | 
Collection<String> | 
getPropertyNames()  | 
RuntimeType | 
getRuntimeType()  | 
boolean | 
isEnabled(Class<? extends Feature> featureClass)  | 
boolean | 
isEnabled(Feature feature)  | 
boolean | 
isProperty(String name)
Get the value of the property with a given name converted to  
boolean. | 
boolean | 
isRegistered(Class<?> componentClass)  | 
boolean | 
isRegistered(Object component)  | 
ExternalConfigurationModel | 
mergeProperties(Map<String,Object> inputProperties)
Merge properties from other (found) external configuration. 
 | 
public SystemPropertiesConfigurationModel(List<String> propertyClassNames)
ExternalConfigurationModel for properties defined by classes in propertyClassNames list.propertyClassNames - List of property defining class names.public <T> T as(String name, Class<T> clazz)
ExternalConfigurationModelas in interface ExternalConfigurationModel<Void>T - type of an expected valuename - property nameclazz - class type of an expected valuepublic <T> Optional<T> getOptionalProperty(String name, Class<T> clazz)
ExternalConfigurationModelgetOptionalProperty in interface ExternalConfigurationModel<Void>T - type of an expected valuename - property nameclazz - class type of an expected valuepublic ExternalConfigurationModel mergeProperties(Map<String,Object> inputProperties)
ExternalConfigurationModelmergeProperties in interface ExternalConfigurationModel<Void>inputProperties - those properties will be merged into ourspublic Void getConfig()
ExternalConfigurationModelgetConfig in interface ExternalConfigurationModel<Void>public boolean isProperty(String name)
ExtendedConfigboolean.
 Returns false if the value is not convertible.isProperty in interface ExtendedConfigname - property name.boolean property value or false if the property is not
         convertible.public RuntimeType getRuntimeType()
getRuntimeType in interface Configurationpublic Map<String,Object> getProperties()
getProperties in interface Configurationpublic Object getProperty(String name)
getProperty in interface Configurationpublic Collection<String> getPropertyNames()
getPropertyNames in interface Configurationpublic boolean isEnabled(Feature feature)
isEnabled in interface Configurationpublic boolean isEnabled(Class<? extends Feature> featureClass)
isEnabled in interface Configurationpublic boolean isRegistered(Object component)
isRegistered in interface Configurationpublic boolean isRegistered(Class<?> componentClass)
isRegistered in interface Configurationpublic Map<Class<?>,Integer> getContracts(Class<?> componentClass)
getContracts in interface Configurationpublic Set<Class<?>> getClasses()
getClasses in interface Configurationpublic Set<Object> getInstances()
getInstances in interface ConfigurationCopyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.