public class PropertyConfigurationImmutable extends Object implements PropertyConfigurationInternal
EMPTY_PROPERTY_LIST| Constructor and Description |
|---|
PropertyConfigurationImmutable(NamingStrategy namingStrategy,
List<GroupProxy> groupList,
List<Property<?>> properties,
Map<GroupProxy,List<Property<?>>> propertiesByGroup,
Map<String,Property<?>> propertiesByAnyName,
Map<Property<?>,List<EffectiveName>> aliasesByProperty,
Map<Property<?>,String> canonicalNameByProperty,
List<ExportGroup> exportGroups) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsUserGroups()
Returns true if any of the registered groups are user groups.
|
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. |
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.
|
public PropertyConfigurationImmutable(NamingStrategy namingStrategy, List<GroupProxy> groupList, List<Property<?>> properties, Map<GroupProxy,List<Property<?>>> propertiesByGroup, Map<String,Property<?>> propertiesByAnyName, Map<Property<?>,List<EffectiveName>> aliasesByProperty, Map<Property<?>,String> canonicalNameByProperty, List<ExportGroup> exportGroups)
public Property<?> getProperty(String classpathStyleName)
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 PropertyConfigurationInternalclasspathStyleName - A path to a property in the classpath style.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 List<Property<?>> getProperties()
PropertyConfigurationInternalgetProperties in interface PropertyConfigurationInternalpublic List<GroupProxy> getPropertyGroups()
PropertyConfigurationInternalgetPropertyGroups in interface PropertyConfigurationInternalpublic boolean containsUserGroups()
PropertyConfigurationInternalcontainsUserGroups in interface PropertyConfigurationInternalpublic List<Property<?>> getPropertiesForGroup(GroupProxy group)
PropertyConfigurationInternalgetPropertiesForGroup in interface PropertyConfigurationInternalgroup - The group to get Properties forpublic GroupProxy getGroupForProperty(Property<?> prop)
PropertyConfigurationInternalgetGroupForProperty in interface PropertyConfigurationInternalprop - The property to get the PropertyGroup forpublic List<ExportGroup> getExportGroups()
PropertyConfigurationInternalgetExportGroups in interface PropertyConfigurationInternalpublic NamingStrategy getNamingStrategy()
PropertyConfigurationgetNamingStrategy in interface PropertyConfigurationCopyright © 2022. All rights reserved.