- java.lang.Object
-
- org.apache.logging.log4j.util.PropertySource.Util
-
- Enclosing interface:
- PropertySource
public static final class PropertySource.Util extends Object
Utility methods useful for PropertySource implementations.- Since:
- 2.10.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CharSequence
join(Iterable<? extends CharSequence> tokens)
Joins a list of strings separating each token with a ".".static CharSequence
joinAsCamelCase(Iterable<? extends CharSequence> tokens)
Joins a list of strings separating each token with a ".".static List<CharSequence>
tokenize(CharSequence value)
Converts a property name string into a list of tokens.
-
-
-
Method Detail
-
tokenize
public static List<CharSequence> tokenize(CharSequence value)
Converts a property name string into a list of tokens. This will strip a prefix oflog4j2
along with separators of dash-
, dot.
, underscore_
, and slash/
. Tokens can also be separated by camel case conventions without needing a separator character in between.- Parameters:
value
- property name- Returns:
- the property broken into lower case tokens
-
join
public static CharSequence join(Iterable<? extends CharSequence> tokens)
Joins a list of strings separating each token with a ".". The first token (which should be the component name) will be stored as is. The second, and subsequent, tokens will have their first character forced to lower case.- Parameters:
tokens
- tokens to convert- Returns:
- a CharSequence with each token delimited by a period.
-
joinAsCamelCase
public static CharSequence joinAsCamelCase(Iterable<? extends CharSequence> tokens)
Joins a list of strings separating each token with a ".".- Parameters:
tokens
- tokens to convert- Returns:
- tokensAsCamelCase
-
-