public class PropertiesPropertySource extends java.lang.Object implements PropertySource
Properties
instance. Normalized property names follow a scheme like this:
Log4jContextSelector
would normalize to log4j2.contextSelector
.PropertySource.Comparator, PropertySource.Util
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
PREFIX |
private java.util.Properties |
properties |
Constructor and Description |
---|
PropertiesPropertySource(java.util.Properties properties) |
Modifier and Type | Method and Description |
---|---|
void |
forEach(BiConsumer<java.lang.String,java.lang.String> action)
Iterates over all properties and performs an action for each key/value pair.
|
java.lang.CharSequence |
getNormalForm(java.lang.Iterable<? extends java.lang.CharSequence> tokens)
Converts a list of property name tokens into a normal form.
|
int |
getPriority()
Returns the order in which this PropertySource has priority.
|
private static final java.lang.String PREFIX
private final java.util.Properties properties
public PropertiesPropertySource(java.util.Properties properties)
public int getPriority()
PropertySource
getPriority
in interface PropertySource
public void forEach(BiConsumer<java.lang.String,java.lang.String> action)
PropertySource
forEach
in interface PropertySource
action
- action to perform on each key/value pairpublic java.lang.CharSequence getNormalForm(java.lang.Iterable<? extends java.lang.CharSequence> tokens)
PropertySource
getNormalForm
in interface PropertySource
tokens
- list of property name tokens