Class JPropWriteContext
- java.lang.Object
-
- com.fasterxml.jackson.core.JsonStreamContext
-
- com.fasterxml.jackson.dataformat.javaprop.io.JPropWriteContext
-
public class JPropWriteContext extends com.fasterxml.jackson.core.JsonStreamContext
-
-
Field Summary
Fields Modifier and Type Field Description protected int_basePathLengthprotected JPropWriteContext_childprotected java.lang.String_currentNameName of the field of which value is to be parsed; only used for OBJECT contextsprotected java.lang.Object_currentValueValue that is being serialized and caused this context to be created; typically a POJO or container type.protected boolean_gotNameMarker used to indicate that we just received a name, and now expect a valueprotected JPropWriteContext_parentParent context for this context; null for root context.
-
Constructor Summary
Constructors Modifier Constructor Description protectedJPropWriteContext(int type, JPropWriteContext parent, int basePathLength)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBuilderappendDesc(java.lang.StringBuilder sb)JPropWriteContextcreateChildArrayContext(int basePathLength)JPropWriteContextcreateChildObjectContext(int basePathLength)static JPropWriteContextcreateRootContext()static JPropWriteContextcreateRootContext(int basePathLength)java.lang.StringgetCurrentName()java.lang.ObjectgetCurrentValue()JPropWriteContextgetParent()private voidreset(int type, int basePathLength)voidsetCurrentValue(java.lang.Object v)java.lang.StringtoString()Overridden to provide developer JsonPointer representation of the context.voidtruncatePath(java.lang.StringBuilder sb)booleanwriteFieldName(java.lang.String name)booleanwriteValue()
-
-
-
Field Detail
-
_parent
protected final JPropWriteContext _parent
Parent context for this context; null for root context.
-
_child
protected JPropWriteContext _child
-
_currentValue
protected java.lang.Object _currentValue
Value that is being serialized and caused this context to be created; typically a POJO or container type.
-
_gotName
protected boolean _gotName
Marker used to indicate that we just received a name, and now expect a value
-
_currentName
protected java.lang.String _currentName
Name of the field of which value is to be parsed; only used for OBJECT contexts
-
_basePathLength
protected int _basePathLength
-
-
Constructor Detail
-
JPropWriteContext
protected JPropWriteContext(int type, JPropWriteContext parent, int basePathLength)
-
-
Method Detail
-
reset
private void reset(int type, int basePathLength)
-
createRootContext
public static JPropWriteContext createRootContext()
-
createRootContext
public static JPropWriteContext createRootContext(int basePathLength)
-
createChildArrayContext
public JPropWriteContext createChildArrayContext(int basePathLength)
-
createChildObjectContext
public JPropWriteContext createChildObjectContext(int basePathLength)
-
writeFieldName
public boolean writeFieldName(java.lang.String name) throws com.fasterxml.jackson.core.JsonProcessingException- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
writeValue
public boolean writeValue()
-
truncatePath
public void truncatePath(java.lang.StringBuilder sb)
-
getParent
public final JPropWriteContext getParent()
- Specified by:
getParentin classcom.fasterxml.jackson.core.JsonStreamContext
-
getCurrentName
public java.lang.String getCurrentName()
- Specified by:
getCurrentNamein classcom.fasterxml.jackson.core.JsonStreamContext
-
getCurrentValue
public java.lang.Object getCurrentValue()
- Overrides:
getCurrentValuein classcom.fasterxml.jackson.core.JsonStreamContext
-
setCurrentValue
public void setCurrentValue(java.lang.Object v)
- Overrides:
setCurrentValuein classcom.fasterxml.jackson.core.JsonStreamContext
-
appendDesc
public java.lang.StringBuilder appendDesc(java.lang.StringBuilder sb)
-
toString
public final java.lang.String toString()
Overridden to provide developer JsonPointer representation of the context.- Overrides:
toStringin classcom.fasterxml.jackson.core.JsonStreamContext
-
-