| Modifier and Type | Class and Description |
|---|---|
| public static class | PropertySource.
Comparator for ordering PropertySource instances by priority. |
| public static class | PropertySource.
Utility methods useful for PropertySource implementations. |
| Modifier and Type | Method and Description |
|---|---|
| public default boolean | Returns: The value or null;The key to search for. key)For PropertySources that cannot iterate over all the potential properties this provides a direct lookup. |
| public default void | forEach(BiConsumer<String, String>
action to perform on each key/value pair action)Iterates over all properties and performs an action for each key/value pair. |
| public default CharSequence | Returns: a normalized property name using the given tokenslist of property name tokens tokens)Converts a list of property name tokens into a normal form. |
| public int | |
| public default String | Returns: The value or null;The key to search for. key)For PropertySources that cannot iterate over all the potential properties this provides a direct lookup. |
| public default Collection |
| containsProperty | back to summary |
|---|---|
| public default boolean containsProperty(String key) For PropertySources that cannot iterate over all the potential properties this provides a direct lookup.
| |
| forEach | back to summary |
|---|---|
| public default void forEach(BiConsumer<String, String> action) Iterates over all properties and performs an action for each key/value pair.
| |
| getNormalForm | back to summary |
|---|---|
| public default CharSequence getNormalForm(Iterable<? extends CharSequence> tokens) Converts a list of property name tokens into a normal form. For example, a list of tokens such as "foo", "bar", "baz", might be normalized into the property name "log4j2.fooBarBaz".
| |
| getPriority | back to summary |
|---|---|
| public int getPriority() Returns the order in which this PropertySource has priority. A higher value means that the source will be searched later and can be overridden by other property sources.
| |
| getProperty | back to summary |
|---|---|
| public default String getProperty(String key) For PropertySources that cannot iterate over all the potential properties this provides a direct lookup. | |
| getPropertyNames | back to summary |
|---|---|
| public default Collection Returns the list of all property names.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(final PropertySource
the first object to be compared. o1, final PropertySource the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| Comparator | back to summary |
|---|---|
| public Comparator() | |
| compare | back to summary |
|---|---|
| public int compare(final PropertySource o1, final PropertySource o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final Map | |
| private static final Pattern | |
| private static final Pattern |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static CharSequence | Returns: tokensAsCamelCasetokens to convert tokens)Joins a list of strings using camelCaseConventions. |
| public static List | Returns: the property broken into lower case tokensproperty name value)Converts a property name string into a list of tokens. |
| CACHE | back to summary |
|---|---|
| private static final Map<CharSequence, List<CharSequence>> CACHE | |
| PREFIX_PATTERN | back to summary |
|---|---|
| private static final Pattern PREFIX_PATTERN | |
| PROPERTY_TOKENIZER | back to summary |
|---|---|
| private static final Pattern PROPERTY_TOKENIZER | |
| Util | back to summary |
|---|---|
| private Util() | |
| joinAsCamelCase | back to summary |
|---|---|
| public static CharSequence joinAsCamelCase(final Iterable<? extends CharSequence> tokens) Joins a list of strings using camelCaseConventions.
| |
| tokenize | back to summary |
|---|---|
| public static List Converts a property name string into a list of tokens. This will strip a prefix of
| |