public class ConstructionDefinitionMutable extends Object implements ConstructionDefinition
EMPTY_PROPERTY_LIST| Constructor and Description |
|---|
ConstructionDefinitionMutable(NamingStrategy namingStrategy) |
| Modifier and Type | Method and Description |
|---|---|
void |
addExportGroup(ExportGroup exportGroup) |
ConstructionProblem |
addProperty(Class<? extends BasePropertyGroup> group,
Property<?> property)
Adds a BasePropertyGroup, its Property and the name and aliases for that property
to all the collections.
|
protected <T> ConstructionProblem.InvalidDefaultValue |
checkForInvalidDefaultValue(Property<T> property,
Class<? extends BasePropertyGroup> group,
String canonName)
Checks a Property's default value against its Validators and adds entries
to constructProblems if there are issues.
|
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.
|
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 classpathStyleName)
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().
|
ConstructionDefinition |
toImmutable()
Return an immutable instance.
|
public ConstructionDefinitionMutable(NamingStrategy namingStrategy)
public ConstructionProblem addProperty(Class<? extends BasePropertyGroup> group, Property<?> property)
group - The BasePropertyGroup parent of the propertyproperty - The Property to be addedpublic void addExportGroup(ExportGroup exportGroup)
public Property<?> getProperty(String classpathStyleName)
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 ConstructionDefinitionclasspathStyleName - A path to a property in the classpath style.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 List<Property<?>> getProperties()
ConstructionDefinitiongetProperties in interface ConstructionDefinitionpublic List<Class<? extends BasePropertyGroup>> getPropertyGroups()
ConstructionDefinitiongetPropertyGroups in interface ConstructionDefinitionpublic List<Property<?>> getPropertiesForGroup(Class<? extends BasePropertyGroup> group)
ConstructionDefinitiongetPropertiesForGroup in interface ConstructionDefinitiongroup - The group to get Properties forpublic Class<? extends BasePropertyGroup> getGroupForProperty(Property<?> prop)
ConstructionDefinitiongetGroupForProperty in interface ConstructionDefinitionprop - The property to get the PropertyGroup forpublic List<ExportGroup> getExportGroups()
ConstructionDefinitiongetExportGroups in interface ConstructionDefinitionpublic NamingStrategy getNamingStrategy()
ConstructionDefinitiongetNamingStrategy in interface ConstructionDefinitionpublic Map<String,String> getSystemEnvironment()
ConstructionDefinitiongetSystemEnvironment in interface ConstructionDefinitionprotected final <T> ConstructionProblem.InvalidDefaultValue checkForInvalidDefaultValue(Property<T> property, Class<? extends BasePropertyGroup> group, String canonName)
T - property - group - canonName - public ConstructionDefinition toImmutable()
Copyright © 2017. All rights reserved.