Class ConfigurationPropertyName
java.lang.Object
org.springframework.boot.context.properties.source.ConfigurationPropertyName
- All Implemented Interfaces:
Comparable<ConfigurationPropertyName>
public final class ConfigurationPropertyName
extends Object
implements Comparable<ConfigurationPropertyName>
A configuration property name composed of elements separated by dots. User created
names may contain the characters "
a-z" "0-9" and "-", they must
be lower-case and must start with an alphanumeric character. The "-" is used
purely for formatting, i.e. "foo-bar" and "foobar" are considered
equivalent.
The "[" and "]" characters may be used to indicate an associative
index(i.e. a Map key or a Collection index). Indexes names are not
restricted and are considered case-sensitive.
Here are some typical examples:
spring.main.banner-modeserver.hosts[0].namelog[org.springboot].level
- Since:
- 2.0.0
- Author:
- Phillip Webb, Madhura Bhave
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe various forms that a non-indexed element value can take. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ConfigurationPropertyNameAn emptyConfigurationPropertyName. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigurationPropertyNameadapt(CharSequence name, char separator) Create aConfigurationPropertyNameby adapting the given source.Create a newConfigurationPropertyNameby appending the given suffix.append(ConfigurationPropertyName suffix) Create a newConfigurationPropertyNameby appending the given suffix.chop(int size) Return a newConfigurationPropertyNameby chopping this name to the givensize.intbooleangetElement(int elementIndex, ConfigurationPropertyName.Form form) Return an element in the name in the given form.Return the last element in the name in the given form.intReturn the total number of elements in the name.Return the parent of thisConfigurationPropertyNameorEMPTYif there is no parent.inthashCode()booleanReturntrueif any element in the name is indexed.booleanReturnstrueif this element is an ancestor (immediate or nested parent) of the specified name.booleanisEmpty()Returnstrueif thisConfigurationPropertyNameis empty.booleanReturn if the last element in the name is indexed.booleanisNumericIndex(int elementIndex) Return if the element in the name is indexed and numeric.boolean