Module logstash.logback.encoder
Package net.logstash.logback.decorate
Class CharacterEscapesJsonFactoryDecorator.Escape
java.lang.Object
net.logstash.logback.decorate.CharacterEscapesJsonFactoryDecorator.Escape
- All Implemented Interfaces:
Comparable<CharacterEscapesJsonFactoryDecorator.Escape>
- Enclosing class:
CharacterEscapesJsonFactoryDecorator
public static class CharacterEscapesJsonFactoryDecorator.Escape
extends Object
implements Comparable<CharacterEscapesJsonFactoryDecorator.Escape>
Defines how a character will be escaped whenever that character is attempted to be written by a JsonGenerator.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanintinthashCode()voidsetEscapeSequence(String escapeSequence) voidSets the target string that will be replaced with theescapeSequence.voidsetTargetCharacter(char targetCharacter) Sets the target character that will be replaced with theescapeSequence.voidsetTargetCharacterCode(int targetCharacterCode)
-
Constructor Details
-
Escape
public Escape() -
Escape
-
Escape
-
Escape
-
-
Method Details
-
setTarget
Sets the target string that will be replaced with theescapeSequence. Must have length == 1- Parameters:
target- the target string that will be escaped- Throws:
IllegalArgumentException- if target length is != 1
-
setTargetCharacter
public void setTargetCharacter(char targetCharacter) Sets the target character that will be replaced with theescapeSequence.- Parameters:
targetCharacter- the target character
-
getTargetCharacterCode
public int getTargetCharacterCode() -
setTargetCharacterCode
public void setTargetCharacterCode(int targetCharacterCode) -
getEscapeSequence
-
setEscapeSequence
-
compareTo
- Specified by:
compareToin interfaceComparable<CharacterEscapesJsonFactoryDecorator.Escape>
-
equals
-
hashCode
public int hashCode()
-