public class StaticPropertyConfigurationMutable extends Object implements StaticPropertyConfiguration
EMPTY_PROPERTY_LIST| Constructor and Description |
|---|
StaticPropertyConfigurationMutable(NamingStrategy namingStrategy) |
| Modifier and Type | Method and Description |
|---|---|
void |
addExportGroup(ExportGroup exportGroup) |
ConstructionProblem |
addProperty(GroupProxy group,
Property<?> property)
Adds a Group, its Property and the name and aliases for that property
to all the collections.
|
protected <T> ConstructionProblem.InvalidDefaultValue |
checkForInvalidDefaultValue(Property<T> property,
GroupProxy group,
String canonName)
Checks a Property's default value against its Validators and adds entries
to constructProblems if there are issues.
|
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.
|
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 classpathStyleName)
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.
|
StaticPropertyConfiguration |
toImmutable()
Return an immutable instance.
|
public StaticPropertyConfigurationMutable(NamingStrategy namingStrategy)
public ConstructionProblem addProperty(GroupProxy group, Property<?> property)
group - The Group parent of the propertyproperty - The Property to be addedpublic void addExportGroup(ExportGroup exportGroup)
public Property<?> getProperty(String classpathStyleName)
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 StaticPropertyConfigurationclasspathStyleName - A path to a property in the classpath style.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 List<Property<?>> getProperties()
StaticPropertyConfigurationgetProperties in interface StaticPropertyConfigurationpublic List<GroupProxy> getPropertyGroups()
StaticPropertyConfigurationgetPropertyGroups in interface StaticPropertyConfigurationpublic boolean containsUserGroups()
StaticPropertyConfigurationcontainsUserGroups in interface StaticPropertyConfigurationpublic List<Property<?>> getPropertiesForGroup(GroupProxy group)
StaticPropertyConfigurationgetPropertiesForGroup in interface StaticPropertyConfigurationgroup - The group to get Properties forpublic GroupProxy getGroupForProperty(Property<?> prop)
StaticPropertyConfigurationgetGroupForProperty in interface StaticPropertyConfigurationprop - The property to get the PropertyGroup forpublic List<ExportGroup> getExportGroups()
StaticPropertyConfigurationgetExportGroups in interface StaticPropertyConfigurationpublic NamingStrategy getNamingStrategy()
StaticPropertyConfigurationgetNamingStrategy in interface StaticPropertyConfigurationprotected final <T> ConstructionProblem.InvalidDefaultValue checkForInvalidDefaultValue(Property<T> property, GroupProxy group, String canonName)
T - property - group - canonName - public StaticPropertyConfiguration toImmutable()
Copyright © 2017. All rights reserved.