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
LOGGERFields inherited from interface org.apache.logging.log4j.core.pattern.PatternConverter
CATEGORY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateEqualsReplacementConverter(List<PatternFormatter> formatters, String testString, String substitution, PatternParser parser) Construct the converter. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanequals(String str, StringBuilder buff, int from, int len) Returns true if the specified String equals the specified section of the specified StringBuilder.static EqualsReplacementConverternewInstance(Configuration config, String[] options) Gets an instance of the class.Methods inherited from class org.apache.logging.log4j.core.pattern.EqualsBaseReplacementConverter
format, parseSubstitutionMethods inherited from class org.apache.logging.log4j.core.pattern.LogEventPatternConverter
format, handlesThrowable, isVariableMethods 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:EqualsBaseReplacementConverterReturns true if the specified String equals the specified section of the specified StringBuilder.- Specified by:
equalsin 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
-