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
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
int
int
hashCode()
void
setEscapeSequence
(String escapeSequence) void
Sets the target string that will be replaced with theescapeSequence
.void
setTargetCharacter
(char targetCharacter) Sets the target character that will be replaced with theescapeSequence
.void
setTargetCharacterCode
(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:
compareTo
in interfaceComparable<CharacterEscapesJsonFactoryDecorator.Escape>
-
equals
-
hashCode
public int hashCode()
-