Package org.entur.jackson.jsh
Class SyntaxHighlightingPrettyPrinter
java.lang.Object
com.fasterxml.jackson.core.util.DefaultPrettyPrinter
org.entur.jackson.jsh.SyntaxHighlightingPrettyPrinter
- All Implemented Interfaces:
com.fasterxml.jackson.core.PrettyPrinter,com.fasterxml.jackson.core.util.Instantiatable<com.fasterxml.jackson.core.util.DefaultPrettyPrinter>,Serializable
public class SyntaxHighlightingPrettyPrinter
extends com.fasterxml.jackson.core.util.DefaultPrettyPrinter
Pretty-printer which technically can produce output with or without indent / line-breaks.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.core.util.DefaultPrettyPrinter
com.fasterxml.jackson.core.util.DefaultPrettyPrinter.FixedSpaceIndenter, com.fasterxml.jackson.core.util.DefaultPrettyPrinter.Indenter, com.fasterxml.jackson.core.util.DefaultPrettyPrinter.NopIndenter -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SyntaxHighlighterIndenterprotected JsonStreamContextListenerprotected SyntaxHighlighterIndenterprotected SyntaxHighlighterFields inherited from class com.fasterxml.jackson.core.util.DefaultPrettyPrinter
_arrayEmptySeparator, _arrayIndenter, _arrayValueSeparator, _nesting, _objectEmptySeparator, _objectEntrySeparator, _objectFieldValueSeparatorWithSpaces, _objectIndenter, _rootSeparator, _separators, _spacesInObjectEntries, DEFAULT_ROOT_VALUE_SEPARATORFields inherited from interface com.fasterxml.jackson.core.PrettyPrinter
DEFAULT_SEPARATORS -
Constructor Summary
ConstructorsConstructorDescriptionSyntaxHighlightingPrettyPrinter(SyntaxHighlighter syntaxHighlighter, SyntaxHighlighterIndenter objectIndenter, SyntaxHighlighterIndenter arrayIndenter, JsonStreamContextListener listener) -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeArrayValues(com.fasterxml.jackson.core.JsonGenerator gen) voidbeforeObjectEntries(com.fasterxml.jackson.core.JsonGenerator gen) voidvoidsetCommaColor(String commaColor) voidsetValueColor(String valueColor) voidwriteArrayValueSeparator(com.fasterxml.jackson.core.JsonGenerator gen) voidwriteEndArray(com.fasterxml.jackson.core.JsonGenerator gen, int nrOfValues) voidwriteEndObject(com.fasterxml.jackson.core.JsonGenerator gen, int nrOfEntries) voidwriteObjectEntrySeparator(com.fasterxml.jackson.core.JsonGenerator gen) voidwriteObjectFieldValueSeparator(com.fasterxml.jackson.core.JsonGenerator gen) voidwriteRootValueSeparator(com.fasterxml.jackson.core.JsonGenerator gen) voidwriteStartArray(com.fasterxml.jackson.core.JsonGenerator gen) voidwriteStartObject(com.fasterxml.jackson.core.JsonGenerator gen) Methods inherited from class com.fasterxml.jackson.core.util.DefaultPrettyPrinter
_withSpaces, createInstance, indentArraysWith, indentObjectsWith, withArrayIndenter, withObjectIndenter, withoutSpacesInObjectEntries, withRootSeparator, withRootSeparator, withSeparators, withSpacesInObjectEntries
-
Field Details
-
syntaxHighlighter
-
objectIndenter
-
arrayIndenter
-
listener
-
-
Constructor Details
-
SyntaxHighlightingPrettyPrinter
public SyntaxHighlightingPrettyPrinter(SyntaxHighlighter syntaxHighlighter, SyntaxHighlighterIndenter objectIndenter, SyntaxHighlighterIndenter arrayIndenter, JsonStreamContextListener listener)
-
-
Method Details
-
writeRootValueSeparator
public void writeRootValueSeparator(com.fasterxml.jackson.core.JsonGenerator gen) throws IOException - Specified by:
writeRootValueSeparatorin interfacecom.fasterxml.jackson.core.PrettyPrinter- Overrides:
writeRootValueSeparatorin classcom.fasterxml.jackson.core.util.DefaultPrettyPrinter- Throws:
IOException
-
writeStartObject
- Specified by:
writeStartObjectin interfacecom.fasterxml.jackson.core.PrettyPrinter- Overrides:
writeStartObjectin classcom.fasterxml.jackson.core.util.DefaultPrettyPrinter- Throws:
IOException
-
writeEndObject
public void writeEndObject(com.fasterxml.jackson.core.JsonGenerator gen, int nrOfEntries) throws IOException - Specified by:
writeEndObjectin interfacecom.fasterxml.jackson.core.PrettyPrinter- Overrides:
writeEndObjectin classcom.fasterxml.jackson.core.util.DefaultPrettyPrinter- Throws:
IOException
-
writeObjectEntrySeparator
public void writeObjectEntrySeparator(com.fasterxml.jackson.core.JsonGenerator gen) throws IOException - Specified by:
writeObjectEntrySeparatorin interfacecom.fasterxml.jackson.core.PrettyPrinter- Overrides:
writeObjectEntrySeparatorin classcom.fasterxml.jackson.core.util.DefaultPrettyPrinter- Throws:
IOException
-
writeObjectFieldValueSeparator
public void writeObjectFieldValueSeparator(com.fasterxml.jackson.core.JsonGenerator gen) throws IOException - Specified by:
writeObjectFieldValueSeparatorin interfacecom.fasterxml.jackson.core.PrettyPrinter- Overrides:
writeObjectFieldValueSeparatorin classcom.fasterxml.jackson.core.util.DefaultPrettyPrinter- Throws:
IOException
-
writeStartArray
- Specified by:
writeStartArrayin interfacecom.fasterxml.jackson.core.PrettyPrinter- Overrides:
writeStartArrayin classcom.fasterxml.jackson.core.util.DefaultPrettyPrinter- Throws:
IOException
-
writeEndArray
public void writeEndArray(com.fasterxml.jackson.core.JsonGenerator gen, int nrOfValues) throws IOException - Specified by:
writeEndArrayin interfacecom.fasterxml.jackson.core.PrettyPrinter- Overrides:
writeEndArrayin classcom.fasterxml.jackson.core.util.DefaultPrettyPrinter- Throws:
IOException
-
writeArrayValueSeparator
public void writeArrayValueSeparator(com.fasterxml.jackson.core.JsonGenerator gen) throws IOException - Specified by:
writeArrayValueSeparatorin interfacecom.fasterxml.jackson.core.PrettyPrinter- Overrides:
writeArrayValueSeparatorin classcom.fasterxml.jackson.core.util.DefaultPrettyPrinter- Throws:
IOException
-
beforeArrayValues
- Specified by:
beforeArrayValuesin interfacecom.fasterxml.jackson.core.PrettyPrinter- Overrides:
beforeArrayValuesin classcom.fasterxml.jackson.core.util.DefaultPrettyPrinter- Throws:
IOException
-
beforeObjectEntries
- Specified by:
beforeObjectEntriesin interfacecom.fasterxml.jackson.core.PrettyPrinter- Overrides:
beforeObjectEntriesin classcom.fasterxml.jackson.core.util.DefaultPrettyPrinter- Throws:
IOException
-
setValueColor
-
setCommaColor
-
cleanCommaColor
public void cleanCommaColor()
-