public final class ObjectWriterRootName<T> extends ObjectWriterAdapter<T>
| Modifier and Type | Field and Description |
|---|---|
(package private) java.lang.String |
rootName |
containsNoneFieldGetter, features, fieldWriterArray, fieldWriters, googleCollection, hasFilter, hashCodes, hasValueField, jsonbClassInfo, mapping, nameFilter, nameWithColonUTF16, nameWithColonUTF8, objectClass, propertyFilter, propertyPreFilter, serializable, TYPE, typeKey, typeKeyJSONB, typeName, typeNameHash, typeNameJSONB, typeNameSymbolCache, valueFilter| Constructor and Description |
|---|
ObjectWriterRootName(java.lang.Class<T> objectClass,
java.lang.String typeKey,
java.lang.String typeName,
java.lang.String rootName,
long features,
java.util.List<FieldWriter> fieldWriters) |
| Modifier and Type | Method and Description |
|---|---|
JSONObject |
toJSONObject(T object,
long features) |
void |
write(JSONWriter jsonWriter,
java.lang.Object object,
java.lang.Object fieldName,
java.lang.reflect.Type fieldType,
long features)
Writes an object to the JSONWriter with the given field name, field type, and features.
|
void |
writeJSONB(JSONWriter jsonWriter,
java.lang.Object object,
java.lang.Object fieldName,
java.lang.reflect.Type fieldType,
long features)
Writes an object to the JSONWriter in JSONB format.
|
errorOnNoneSerializable, getFeatures, getFieldWriter, getFieldWriters, hasFilter, hasFilter0, setNameFilter, setPropertyFilter, setPropertyPreFilter, setValueFilter, toJSONObject, toMap, toString, writeArrayMappingJSONB, writeClassInfo, writeTypeInfo, writeWithFilterclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFieldValue, getFieldWriter, setFilter, toJSONString, write, writeArrayMapping, writeArrayMappingJSONB, writeWithFilterpublic ObjectWriterRootName(java.lang.Class<T> objectClass, java.lang.String typeKey, java.lang.String typeName, java.lang.String rootName, long features, java.util.List<FieldWriter> fieldWriters)
public void writeJSONB(JSONWriter jsonWriter, java.lang.Object object, java.lang.Object fieldName, java.lang.reflect.Type fieldType, long features)
ObjectWriterwriteJSONB in interface ObjectWriter<T>writeJSONB in class ObjectWriterAdapter<T>jsonWriter - the JSONWriter to which the object should be writtenobject - the object to writefieldName - the name of the field being writtenfieldType - the type of the field being writtenfeatures - the features to use for writingpublic void write(JSONWriter jsonWriter, java.lang.Object object, java.lang.Object fieldName, java.lang.reflect.Type fieldType, long features)
ObjectWriterwrite in interface ObjectWriter<T>write in class ObjectWriterAdapter<T>jsonWriter - the JSONWriter to which the object should be writtenobject - the object to writefieldName - the name of the field being writtenfieldType - the type of the field being writtenfeatures - the features to use for writingpublic JSONObject toJSONObject(T object, long features)
toJSONObject in class ObjectWriterAdapter<T>