public class AndHowCore extends Object implements ConstructionDefinition, ValueMap
EMPTY_PROPERTY_LIST| Constructor and Description |
|---|
AndHowCore(NamingStrategy naming,
List<Loader> loaders,
List<Class<? extends BasePropertyGroup>> registeredGroups) |
| Modifier and Type | Method and Description |
|---|---|
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 |
getEffectiveValue(Property<T> prop)
The explicitly value, or if that is null, the default (which may also be null).
|
<T> T |
getExplicitValue(Property<T> prop)
Get a value explicitly configured.
|
List<ExportGroup> |
getExportGroups()
The list of ExportGroups, which handles exporting property values for use
outside the AndHow framework.
|
Class<? extends BasePropertyGroup> |
getGroupForProperty(Property<?> prop)
Finds the BasePropertyGroup 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(Class<? extends BasePropertyGroup> 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<Class<? extends BasePropertyGroup>> |
getPropertyGroups()
Returns a list of all registered groups.
|
Map<String,String> |
getSystemEnvironment()
Handles access to System.getEnv().
|
boolean |
isExplicitlySet(Property<?> prop)
Returns true if the Property's value was explicitly set via one of the loaders.
|
public AndHowCore(NamingStrategy naming, List<Loader> loaders, List<Class<? extends BasePropertyGroup>> registeredGroups) throws AppFatalException
AppFatalExceptionpublic boolean isExplicitlySet(Property<?> prop)
ValueMapisExplicitlySet in interface ValueMapprop - The property to checkpublic <T> T getExplicitValue(Property<T> prop)
ValueMapgetExplicitValue in interface ValueMapT - prop The property to get the value forpublic <T> T getEffectiveValue(Property<T> prop)
ValueMapgetEffectiveValue in interface ValueMapprop - The property to get the value for.public List<EffectiveName> getAliases(Property<?> property)
ConstructionDefinitiongetAliases in interface ConstructionDefinitionproperty - The property to fetch naming information forpublic String getCanonicalName(Property<?> prop)
ConstructionDefinitiongetCanonicalName in interface ConstructionDefinitionprop - The property to get the canonical name forpublic Class<? extends BasePropertyGroup> getGroupForProperty(Property<?> prop)
ConstructionDefinitiongetGroupForProperty in interface ConstructionDefinitionprop - The property to get the PropertyGroup forpublic List<Property<?>> getPropertiesForGroup(Class<? extends BasePropertyGroup> group)
ConstructionDefinitiongetPropertiesForGroup in interface ConstructionDefinitiongroup - The group to get Properties forpublic Property<?> getProperty(String name)
ConstructionDefinitionmy.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 ConstructionDefinitionname - A path to a property in the classpath style.public List<Class<? extends BasePropertyGroup>> getPropertyGroups()
ConstructionDefinitiongetPropertyGroups in interface ConstructionDefinitionpublic List<Property<?>> getProperties()
ConstructionDefinitiongetProperties in interface ConstructionDefinitionpublic List<ExportGroup> getExportGroups()
ConstructionDefinitiongetExportGroups in interface ConstructionDefinitionpublic NamingStrategy getNamingStrategy()
ConstructionDefinitiongetNamingStrategy in interface ConstructionDefinitionpublic Map<String,String> getSystemEnvironment()
ConstructionDefinitiongetSystemEnvironment in interface ConstructionDefinitionCopyright © 2017. All rights reserved.