public class AndHowCore extends Object implements StaticPropertyConfiguration, ValidatedValues
EMPTY_PROPERTY_LIST| Constructor and Description |
|---|
AndHowCore(NamingStrategy naming,
List<Loader> loaders,
List<GroupProxy> registeredGroups) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsUserGroups()
Returns true if any of the registered groups are user groups.
|
List<EffectiveName> |
getAliases(Property<?> property)
Returns all aliases (in and out) for a property.
|
String |
getCanonicalName(Property<?> prop)
Returns the canonical name of a registered property.
|
<T> T |
getExplicitValue(Property<T> prop)
The value found and loaded for this value by a Loader.
|
List<ExportGroup> |
getExportGroups()
The list of ExportGroups, which handles exporting property values for use
outside the AndHow framework.
|
GroupProxy |
getGroupForProperty(Property<?> prop)
Finds the Group containing the specified Property.
|
NamingStrategy |
getNamingStrategy()
Defines how names are created for Properties.
|
List<Property<?>> |
getProperties()
Returns a complete list of all registered properties.
|
List<Property<?>> |
getPropertiesForGroup(GroupProxy group)
Returns a list of Properties registered in the passed group.
|
Property<?> |
getProperty(String name)
Finds a registered property by any recognized classpath style name,
including the canonical name or 'in' aliases.
|
List<GroupProxy> |
getPropertyGroups()
Returns a list of all registered groups.
|
<T> T |
getValue(Property<T> prop)
The effective value, similar to Property.getValue, but specifically for
the context of this ValueMap.
|
boolean |
isExplicitlySet(Property<?> prop)
Returns true if the Property's value was explicitly set to a non-null value
via one of the loaders.
|
public AndHowCore(NamingStrategy naming, List<Loader> loaders, List<GroupProxy> registeredGroups) throws AppFatalException
AppFatalExceptionpublic boolean isExplicitlySet(Property<?> prop)
ValidatedValuesisExplicitlySet in interface ValidatedValuesprop - The property to checkpublic <T> T getExplicitValue(Property<T> prop)
ValidatedValuesgetExplicitValue in interface ValidatedValuesT - The return type of the Property.prop - The property to get the value forpublic <T> T getValue(Property<T> prop)
ValidatedValuesgetValue in interface ValidatedValuesT - The return type of the Property.prop - The property to get the value for.public List<EffectiveName> getAliases(Property<?> property)
StaticPropertyConfigurationgetAliases in interface StaticPropertyConfigurationproperty - The property to fetch naming information forpublic String getCanonicalName(Property<?> prop)
StaticPropertyConfigurationgetCanonicalName in interface StaticPropertyConfigurationprop - The property to get the canonical name forpublic GroupProxy getGroupForProperty(Property<?> prop)
StaticPropertyConfigurationgetGroupForProperty in interface StaticPropertyConfigurationprop - The property to get the PropertyGroup forpublic List<Property<?>> getPropertiesForGroup(GroupProxy group)
StaticPropertyConfigurationgetPropertiesForGroup in interface StaticPropertyConfigurationgroup - The group to get Properties forpublic Property<?> getProperty(String name)
StaticPropertyConfigurationmy.property and the URI style name, like my/property.
The URI style name is just a means of reading properties in another system -
for AndHow the URI style name is not considered an actual name.getProperty in interface StaticPropertyConfigurationname - A path to a property in the classpath style.public List<GroupProxy> getPropertyGroups()
StaticPropertyConfigurationgetPropertyGroups in interface StaticPropertyConfigurationpublic boolean containsUserGroups()
StaticPropertyConfigurationcontainsUserGroups in interface StaticPropertyConfigurationpublic List<Property<?>> getProperties()
StaticPropertyConfigurationgetProperties in interface StaticPropertyConfigurationpublic List<ExportGroup> getExportGroups()
StaticPropertyConfigurationgetExportGroups in interface StaticPropertyConfigurationpublic NamingStrategy getNamingStrategy()
StaticPropertyConfigurationgetNamingStrategy in interface StaticPropertyConfigurationCopyright © 2017. All rights reserved.