Package org.apache.logging.log4j.util
Class PropertySource.Util
- java.lang.Object
-
- org.apache.logging.log4j.util.PropertySource.Util
-
- Enclosing interface:
- PropertySource
public static final class PropertySource.Util extends java.lang.Object
Utility methods useful for PropertySource implementations.- Since:
- 2.10.0
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.CharSequence,java.util.List<java.lang.CharSequence>>
CACHE
private static java.util.regex.Pattern
PREFIX_PATTERN
private static java.util.regex.Pattern
PROPERTY_TOKENIZER
-
Constructor Summary
Constructors Modifier Constructor Description private
Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.CharSequence
joinAsCamelCase(java.lang.Iterable<? extends java.lang.CharSequence> tokens)
Joins a list of strings using camelCaseConventions.static java.util.List<java.lang.CharSequence>
tokenize(java.lang.CharSequence value)
Converts a property name string into a list of tokens.
-
-
-
Method Detail
-
tokenize
public static java.util.List<java.lang.CharSequence> tokenize(java.lang.CharSequence value)
Converts a property name string into a list of tokens. This will strip a prefix oflog4j
,log4j2
,Log4j
, ororg.apache.logging.log4j
, 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
-
joinAsCamelCase
public static java.lang.CharSequence joinAsCamelCase(java.lang.Iterable<? extends java.lang.CharSequence> tokens)
Joins a list of strings using camelCaseConventions.- Parameters:
tokens
- tokens to convert- Returns:
- tokensAsCamelCase
-
-