Class EqualsReplacementConverter
- java.lang.Object
-
- org.apache.logging.log4j.core.pattern.AbstractPatternConverter
-
- org.apache.logging.log4j.core.pattern.LogEventPatternConverter
-
- org.apache.logging.log4j.core.pattern.EqualsBaseReplacementConverter
-
- org.apache.logging.log4j.core.pattern.EqualsReplacementConverter
-
- All Implemented Interfaces:
PatternConverter
@Plugin(name="equals", category="Converter") public final class EqualsReplacementConverter extends EqualsBaseReplacementConverter
Equals pattern converter.
-
-
Field Summary
-
Fields inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverter
LOGGER
-
Fields inherited from interface org.apache.logging.log4j.core.pattern.PatternConverter
CATEGORY
-
-
Constructor Summary
Constructors Modifier Constructor Description private
EqualsReplacementConverter(java.util.List<PatternFormatter> formatters, java.lang.String testString, java.lang.String substitution, PatternParser parser)
Construct the converter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
equals(java.lang.String str, java.lang.StringBuilder buff, int from, int len)
Returns true if the specified String equals the specified section of the specified StringBuilder.static EqualsReplacementConverter
newInstance(Configuration config, java.lang.String[] options)
Gets an instance of the class.-
Methods inherited from class org.apache.logging.log4j.core.pattern.EqualsBaseReplacementConverter
format, parseSubstitution
-
Methods inherited from class org.apache.logging.log4j.core.pattern.LogEventPatternConverter
format, handlesThrowable, isVariable
-
Methods inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverter
getName, getStyleClass
-
-
-
-
Constructor Detail
-
EqualsReplacementConverter
private EqualsReplacementConverter(java.util.List<PatternFormatter> formatters, java.lang.String testString, java.lang.String substitution, PatternParser parser)
Construct the converter.- Parameters:
formatters
- The PatternFormatters to generate the text to manipulate.testString
- The test string.substitution
- The substitution string.parser
- The PatternParser.
-
-
Method Detail
-
newInstance
public static EqualsReplacementConverter newInstance(Configuration config, java.lang.String[] options)
Gets an instance of the class.- Parameters:
config
- The current Configuration.options
- pattern options, an array of three elements: pattern, testString, and substitution.- Returns:
- instance of class.
-
equals
protected boolean equals(java.lang.String str, java.lang.StringBuilder buff, int from, int len)
Description copied from class:EqualsBaseReplacementConverter
Returns true if the specified String equals the specified section of the specified StringBuilder.- Specified by:
equals
in classEqualsBaseReplacementConverter
- Parameters:
str
- the String to comparebuff
- the StringBuilder to compare a section offrom
- start index in the StringBuilderlen
- length of the section in the StringBuilder- Returns:
- true if equal, false otherwise
-
-