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-mode
  • server.hosts[0].name
  • log[org.springboot].level

Author

Phillip Webb

Madhura Bhave

Since

2.0.0

See also

Types

Link copied to clipboard
enum Form
The various forms that a non-indexed element value can take.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open fun adapt(name: CharSequence, separator: Char): ConfigurationPropertyName
Create a ConfigurationPropertyName by adapting the given source.
Link copied to clipboard
Create a new ConfigurationPropertyName by appending the given suffix.
Link copied to clipboard
Return a new ConfigurationPropertyName by chopping this name to the given size.
Link copied to clipboard
Link copied to clipboard
open fun equals(obj: Any): Boolean
Link copied to clipboard
open fun getElement(elementIndex: Int, form: ConfigurationPropertyName.Form): String
Return an element in the name in the given form.
Link copied to clipboard
Return the last element in the name in the given form.
Link copied to clipboard
Return the total number of elements in the name.
Link copied to clipboard
Return the parent of this ConfigurationPropertyName or EMPTY if there is no parent.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
Return true if any element in the name is indexed.
Link copied to clipboard
Returns true if this element is an ancestor (immediate or nested parent) of the specified name.
Link copied to clipboard
open fun isEmpty(): Boolean
Returns true if this ConfigurationPropertyName is empty.
Link copied to clipboard
Return if the last element in the name is indexed.
Link copied to clipboard
open fun isNumericIndex(elementIndex: Int): Boolean
Return if the element in the name is indexed and numeric.
Link copied to clipboard
Returns true if this element is an immediate parent of the specified name.
Link copied to clipboard
open fun isValid(name: CharSequence): Boolean
Returns if the given name is valid.
Link copied to clipboard
Return a ConfigurationPropertyName for the specified string.
Link copied to clipboard
Return a ConfigurationPropertyName for the specified string or null if the name is not valid.
Link copied to clipboard
Return a new ConfigurationPropertyName by based on this name offset by specific element index.
Link copied to clipboard
open fun toString(): String