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 Details

    • Escape

      public Escape()
    • Escape

      public Escape(String target, String escapeSequence)
    • Escape

      public Escape(int targetCharacterCode, String escapeSequence)
    • Escape

      public Escape(char targetCharacter, String escapeSequence)
  • Method Details

    • setTarget

      public void setTarget(String target)
      Sets the target string that will be replaced with the escapeSequence. 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 the escapeSequence.
      Parameters:
      targetCharacter - the target character
    • getTargetCharacterCode

      public int getTargetCharacterCode()
    • setTargetCharacterCode

      public void setTargetCharacterCode(int targetCharacterCode)
    • getEscapeSequence

      public SerializedString getEscapeSequence()
    • setEscapeSequence

      public void setEscapeSequence(String escapeSequence)
    • compareTo

      public int compareTo(CharacterEscapesJsonFactoryDecorator.Escape that)
      Specified by:
      compareTo in interface Comparable<CharacterEscapesJsonFactoryDecorator.Escape>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object