public class AndHowCore extends Object implements PropertyConfigurationInternal, 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.
|
Stream<PropertyExport> |
export(Class<?>... exportClasses) |
List<EffectiveName> |
getAliases(Property<?> property)
All the effective 'in' & 'out' aliases for this property, not including the canonical name.
|
String |
getCanonicalName(Property<?> prop)
The canonical name of a
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)
True if the Property's value is 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 Stream<PropertyExport> export(Class<?>... exportClasses) throws IllegalAccessException
IllegalAccessExceptionpublic 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)
PropertyConfigurationThe returned aliases may differ from the original requested aliases in two ways:
NamingStrategy may modify 'In' aliases, e.g. convert them to uppercase for
case-insensitive matching. This method returns the modified 'In' aliases.getAliases in interface PropertyConfigurationproperty - The property to fetch naming information forEffectiveNames for this Property.Property.getInAliases(),
Property.getOutAliases(),
Property.getRequestedAliases()public String getCanonicalName(Property<?> prop)
PropertyConfigurationProperty.
Canonical Property names are the full Java classname of the class containing the Property, plus
the Property name, e.g. org.acme.myapp.MyClass.MyProperty. Properties contained in
inner classes and interfaces continue the same naming structure, e.g.
org.acme.myapp.MyClass.MyInnerClass.MyInnerInterface.MyProperty.
getCanonicalName in interface PropertyConfigurationprop - The Property to get the canonical name for.public GroupProxy getGroupForProperty(Property<?> prop)
PropertyConfigurationInternalgetGroupForProperty in interface PropertyConfigurationInternalprop - The property to get the PropertyGroup forpublic List<Property<?>> getPropertiesForGroup(GroupProxy group)
PropertyConfigurationInternalgetPropertiesForGroup in interface PropertyConfigurationInternalgroup - The group to get Properties forpublic Property<?> getProperty(String name)
PropertyConfigurationInternalmy.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 PropertyConfigurationInternalname - A path to a property in the classpath style.public List<GroupProxy> getPropertyGroups()
PropertyConfigurationInternalgetPropertyGroups in interface PropertyConfigurationInternalpublic boolean containsUserGroups()
PropertyConfigurationInternalcontainsUserGroups in interface PropertyConfigurationInternalpublic List<Property<?>> getProperties()
PropertyConfigurationInternalgetProperties in interface PropertyConfigurationInternalpublic List<ExportGroup> getExportGroups()
PropertyConfigurationInternalgetExportGroups in interface PropertyConfigurationInternalpublic NamingStrategy getNamingStrategy()
PropertyConfigurationgetNamingStrategy in interface PropertyConfigurationCopyright © 2021. All rights reserved.