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
ConstructorsModifierConstructorDescriptionprivate
EqualsReplacementConverter
(List<PatternFormatter> formatters, String testString, String substitution, PatternParser parser) Construct the converter. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
equals
(String str, 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, 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 Details
-
EqualsReplacementConverter
private EqualsReplacementConverter(List<PatternFormatter> formatters, String testString, 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 Details
-
newInstance
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
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
-