Class JavaPropsGenerator
- java.lang.Object
-
- com.fasterxml.jackson.core.JsonGenerator
-
- com.fasterxml.jackson.core.base.GeneratorBase
-
- com.fasterxml.jackson.dataformat.javaprop.JavaPropsGenerator
-
- All Implemented Interfaces:
com.fasterxml.jackson.core.Versioned,java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
- Direct Known Subclasses:
PropertiesBackedGenerator,WriterBackedGenerator
public abstract class JavaPropsGenerator extends com.fasterxml.jackson.core.base.GeneratorBase
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringBuilder_basePathprotected boolean_headerCheckedprotected int_indentLengthprotected JPropWriteContext_jpropContextCurrent context, in form we can use it (GeneratorBase has untyped reference; left as null)protected JavaPropsSchema_schemaDefinition of columns being written, if available.protected com.fasterxml.jackson.core.StreamWriteConstraints_streamWriteConstraintsprotected static com.fasterxml.jackson.core.json.JsonWriteContextBOGUS_WRITE_CONTEXTSince our context object does NOT implement standard write context, need to do something like use a placeholder...private static JavaPropsSchemaEMPTY_SCHEMAprotected static intSHORT_WRITE-
Fields inherited from class com.fasterxml.jackson.core.base.GeneratorBase
_cfgNumbersAsStrings, _closed, _features, _ioContext, _objectCodec, _writeContext, DERIVED_FEATURES_MASK, MAX_BIG_DECIMAL_SCALE, SURR1_FIRST, SURR1_LAST, SURR2_FIRST, SURR2_LAST, WRITE_BINARY, WRITE_BOOLEAN, WRITE_NULL, WRITE_NUMBER, WRITE_RAW, WRITE_STRING
-
-
Constructor Summary
Constructors Constructor Description JavaPropsGenerator(com.fasterxml.jackson.core.io.IOContext ctxt, int stdFeatures, com.fasterxml.jackson.core.ObjectCodec codec)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void_appendFieldName(java.lang.StringBuilder path, java.lang.String name)protected void_verifyValueWrite(java.lang.String typeMsg)protected abstract void_writeEscapedEntry(char[] text, int offset, int len)protected abstract void_writeEscapedEntry(java.lang.String value)protected abstract void_writeRaw(char c)protected abstract void_writeRaw(char[] text, int offset, int len)protected abstract void_writeRaw(java.lang.String text)protected abstract void_writeRaw(java.lang.StringBuilder text)protected abstract void_writeUnescapedEntry(java.lang.String value)voidassignCurrentValue(java.lang.Object v)booleancanOmitFields()booleancanUseSchema(com.fasterxml.jackson.core.FormatSchema schema)booleancanWriteBinaryNatively()booleancanWriteFormattedNumbers()booleancanWriteObjectId()booleancanWriteTypeId()java.lang.ObjectcurrentValue()java.lang.ObjectgetCurrentValue()com.fasterxml.jackson.core.JsonStreamContextgetOutputContext()com.fasterxml.jackson.core.FormatSchemagetSchema()com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamWriteCapability>getWriteCapabilities()voidsetCurrentValue(java.lang.Object v)com.fasterxml.jackson.core.JsonGeneratorsetPrettyPrinter(com.fasterxml.jackson.core.PrettyPrinter pp)voidsetSchema(com.fasterxml.jackson.core.FormatSchema schema)com.fasterxml.jackson.core.StreamWriteConstraintsstreamWriteConstraints()com.fasterxml.jackson.core.JsonGeneratoruseDefaultPrettyPrinter()com.fasterxml.jackson.core.Versionversion()voidwriteBinary(com.fasterxml.jackson.core.Base64Variant b64variant, byte[] data, int offset, int len)voidwriteBoolean(boolean state)voidwriteEndArray()voidwriteEndObject()voidwriteFieldName(java.lang.String name)voidwriteNull()voidwriteNumber(double d)voidwriteNumber(float f)voidwriteNumber(int i)voidwriteNumber(long l)voidwriteNumber(java.lang.String encodedValue)voidwriteNumber(java.math.BigDecimal dec)voidwriteNumber(java.math.BigInteger v)voidwriteRaw(char c)voidwriteRaw(char[] text, int offset, int len)voidwriteRaw(com.fasterxml.jackson.core.SerializableString text)voidwriteRaw(java.lang.String text)voidwriteRaw(java.lang.String text, int offset, int len)voidwriteRawUTF8String(byte[] text, int offset, int len)voidwriteStartArray()voidwriteStartObject()voidwriteString(char[] text, int offset, int len)voidwriteString(java.lang.String text)voidwriteUTF8String(byte[] text, int offset, int len)-
Methods inherited from class com.fasterxml.jackson.core.base.GeneratorBase
_asString, _checkRangeBoundsForByteArray, _checkRangeBoundsForCharArray, _checkRangeBoundsForString, _checkStdFeatureChanges, _constructDefaultPrettyPrinter, _decodeSurrogate, _releaseBuffers, close, disable, enable, flush, getCodec, getFeatureMask, ioContext, isClosed, isEnabled, overrideStdFeatures, setCodec, setFeatureMask, writeBinary, writeFieldName, writeObject, writeRawValue, writeRawValue, writeRawValue, writeRawValue, writeStartObject, writeString, writeTree
-
Methods inherited from class com.fasterxml.jackson.core.JsonGenerator
_constructWriteException, _constructWriteException, _constructWriteException, _constructWriteException, _copyCurrentContents, _copyCurrentFloatValue, _copyCurrentFloatValueExact, _copyCurrentIntValue, _copyCurrentStringValue, _reportError, _reportUnsupportedOperation, _reportUnsupportedOperation, _throwInternal, _verifyOffsets, _writeSimpleObject, configure, copyCurrentEvent, copyCurrentEventExact, copyCurrentStructure, getCharacterEscapes, getFormatFeatures, getHighestEscapedChar, getOutputBuffered, getOutputTarget, getPrettyPrinter, isEnabled, overrideFormatFeatures, setCharacterEscapes, setHighestNonEscapedChar, setRootValueSeparator, writeArray, writeArray, writeArray, writeArray, writeArrayFieldStart, writeBinary, writeBinary, writeBinary, writeBinaryField, writeBooleanField, writeEmbeddedObject, writeFieldId, writeNullField, writeNumber, writeNumber, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeObjectField, writeObjectFieldStart, writeObjectId, writeObjectRef, writeOmittedField, writePOJO, writePOJOField, writeStartArray, writeStartArray, writeStartArray, writeStartObject, writeString, writeStringField, writeTypeId, writeTypePrefix, writeTypeSuffix
-
-
-
-
Field Detail
-
SHORT_WRITE
protected static final int SHORT_WRITE
- See Also:
- Constant Field Values
-
BOGUS_WRITE_CONTEXT
protected static final com.fasterxml.jackson.core.json.JsonWriteContext BOGUS_WRITE_CONTEXT
Since our context object does NOT implement standard write context, need to do something like use a placeholder...
-
EMPTY_SCHEMA
private static final JavaPropsSchema EMPTY_SCHEMA
-
_streamWriteConstraints
protected final com.fasterxml.jackson.core.StreamWriteConstraints _streamWriteConstraints
- Since:
- 2.16
-
_schema
protected JavaPropsSchema _schema
Definition of columns being written, if available.
-
_jpropContext
protected JPropWriteContext _jpropContext
Current context, in form we can use it (GeneratorBase has untyped reference; left as null)
-
_basePath
protected final java.lang.StringBuilder _basePath
-
_headerChecked
protected boolean _headerChecked
-
_indentLength
protected int _indentLength
-
-
Method Detail
-
streamWriteConstraints
public com.fasterxml.jackson.core.StreamWriteConstraints streamWriteConstraints()
- Overrides:
streamWriteConstraintsin classcom.fasterxml.jackson.core.JsonGenerator
-
currentValue
public java.lang.Object currentValue()
- Overrides:
currentValuein classcom.fasterxml.jackson.core.base.GeneratorBase
-
getCurrentValue
public java.lang.Object getCurrentValue()
- Overrides:
getCurrentValuein classcom.fasterxml.jackson.core.JsonGenerator
-
assignCurrentValue
public void assignCurrentValue(java.lang.Object v)
- Overrides:
assignCurrentValuein classcom.fasterxml.jackson.core.base.GeneratorBase
-
setCurrentValue
public void setCurrentValue(java.lang.Object v)
- Overrides:
setCurrentValuein classcom.fasterxml.jackson.core.JsonGenerator
-
version
public com.fasterxml.jackson.core.Version version()
- Specified by:
versionin interfacecom.fasterxml.jackson.core.Versioned- Overrides:
versionin classcom.fasterxml.jackson.core.base.GeneratorBase
-
useDefaultPrettyPrinter
public com.fasterxml.jackson.core.JsonGenerator useDefaultPrettyPrinter()
- Overrides:
useDefaultPrettyPrinterin classcom.fasterxml.jackson.core.base.GeneratorBase
-
setPrettyPrinter
public com.fasterxml.jackson.core.JsonGenerator setPrettyPrinter(com.fasterxml.jackson.core.PrettyPrinter pp)
- Overrides:
setPrettyPrinterin classcom.fasterxml.jackson.core.JsonGenerator
-
setSchema
public void setSchema(com.fasterxml.jackson.core.FormatSchema schema)
- Overrides:
setSchemain classcom.fasterxml.jackson.core.JsonGenerator
-
getSchema
public com.fasterxml.jackson.core.FormatSchema getSchema()
- Overrides:
getSchemain classcom.fasterxml.jackson.core.JsonGenerator
-
canUseSchema
public boolean canUseSchema(com.fasterxml.jackson.core.FormatSchema schema)
- Overrides:
canUseSchemain classcom.fasterxml.jackson.core.JsonGenerator
-
canWriteObjectId
public boolean canWriteObjectId()
- Overrides:
canWriteObjectIdin classcom.fasterxml.jackson.core.JsonGenerator
-
canWriteTypeId
public boolean canWriteTypeId()
- Overrides:
canWriteTypeIdin classcom.fasterxml.jackson.core.JsonGenerator
-
canWriteBinaryNatively
public boolean canWriteBinaryNatively()
- Overrides:
canWriteBinaryNativelyin classcom.fasterxml.jackson.core.JsonGenerator
-
canOmitFields
public boolean canOmitFields()
- Overrides:
canOmitFieldsin classcom.fasterxml.jackson.core.JsonGenerator
-
canWriteFormattedNumbers
public boolean canWriteFormattedNumbers()
- Overrides:
canWriteFormattedNumbersin classcom.fasterxml.jackson.core.JsonGenerator
-
getWriteCapabilities
public com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamWriteCapability> getWriteCapabilities()
- Overrides:
getWriteCapabilitiesin classcom.fasterxml.jackson.core.JsonGenerator
-
getOutputContext
public com.fasterxml.jackson.core.JsonStreamContext getOutputContext()
- Overrides:
getOutputContextin classcom.fasterxml.jackson.core.base.GeneratorBase
-
writeFieldName
public void writeFieldName(java.lang.String name) throws java.io.IOException- Specified by:
writeFieldNamein classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
_appendFieldName
protected abstract void _appendFieldName(java.lang.StringBuilder path, java.lang.String name)
-
writeStartArray
public void writeStartArray() throws java.io.IOException- Specified by:
writeStartArrayin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeEndArray
public void writeEndArray() throws java.io.IOException- Specified by:
writeEndArrayin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeStartObject
public void writeStartObject() throws java.io.IOException- Specified by:
writeStartObjectin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeEndObject
public void writeEndObject() throws java.io.IOException- Specified by:
writeEndObjectin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeString
public void writeString(java.lang.String text) throws java.io.IOException- Specified by:
writeStringin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeString
public void writeString(char[] text, int offset, int len) throws java.io.IOException- Specified by:
writeStringin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeRawUTF8String
public void writeRawUTF8String(byte[] text, int offset, int len) throws java.io.IOException- Specified by:
writeRawUTF8Stringin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeUTF8String
public void writeUTF8String(byte[] text, int offset, int len) throws java.io.IOException- Specified by:
writeUTF8Stringin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeRaw
public void writeRaw(java.lang.String text) throws java.io.IOException- Specified by:
writeRawin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeRaw
public void writeRaw(java.lang.String text, int offset, int len) throws java.io.IOException- Specified by:
writeRawin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeRaw
public void writeRaw(char[] text, int offset, int len) throws java.io.IOException- Specified by:
writeRawin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeRaw
public void writeRaw(char c) throws java.io.IOException- Specified by:
writeRawin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeRaw
public void writeRaw(com.fasterxml.jackson.core.SerializableString text) throws java.io.IOException, com.fasterxml.jackson.core.JsonGenerationException- Overrides:
writeRawin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOExceptioncom.fasterxml.jackson.core.JsonGenerationException
-
writeBinary
public void writeBinary(com.fasterxml.jackson.core.Base64Variant b64variant, byte[] data, int offset, int len) throws java.io.IOException- Specified by:
writeBinaryin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeBoolean
public void writeBoolean(boolean state) throws java.io.IOException- Specified by:
writeBooleanin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(int i) throws java.io.IOException- Specified by:
writeNumberin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(long l) throws java.io.IOException- Specified by:
writeNumberin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(java.math.BigInteger v) throws java.io.IOException- Specified by:
writeNumberin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(double d) throws java.io.IOException- Specified by:
writeNumberin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(float f) throws java.io.IOException- Specified by:
writeNumberin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(java.math.BigDecimal dec) throws java.io.IOException- Specified by:
writeNumberin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(java.lang.String encodedValue) throws java.io.IOException- Specified by:
writeNumberin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
writeNull
public void writeNull() throws java.io.IOException- Specified by:
writeNullin classcom.fasterxml.jackson.core.JsonGenerator- Throws:
java.io.IOException
-
_verifyValueWrite
protected void _verifyValueWrite(java.lang.String typeMsg) throws java.io.IOException- Specified by:
_verifyValueWritein classcom.fasterxml.jackson.core.base.GeneratorBase- Throws:
java.io.IOException
-
_writeEscapedEntry
protected abstract void _writeEscapedEntry(java.lang.String value) throws java.io.IOException- Throws:
java.io.IOException
-
_writeEscapedEntry
protected abstract void _writeEscapedEntry(char[] text, int offset, int len) throws java.io.IOException- Throws:
java.io.IOException
-
_writeUnescapedEntry
protected abstract void _writeUnescapedEntry(java.lang.String value) throws java.io.IOException- Throws:
java.io.IOException
-
_writeRaw
protected abstract void _writeRaw(char c) throws java.io.IOException- Throws:
java.io.IOException
-
_writeRaw
protected abstract void _writeRaw(java.lang.String text) throws java.io.IOException- Throws:
java.io.IOException
-
_writeRaw
protected abstract void _writeRaw(java.lang.StringBuilder text) throws java.io.IOException- Throws:
java.io.IOException
-
_writeRaw
protected abstract void _writeRaw(char[] text, int offset, int len) throws java.io.IOException- Throws:
java.io.IOException
-
-