Package com.dslplatform.json.runtime
Class FormatDescription<T>
- java.lang.Object
-
- com.dslplatform.json.runtime.FormatDescription<T>
-
- All Implemented Interfaces:
JsonReader.BindObject<T>,JsonReader.ReadObject<T>,JsonWriter.WriteObject<T>
public final class FormatDescription<T> extends java.lang.Object implements JsonWriter.WriteObject<T>, JsonReader.ReadObject<T>, JsonReader.BindObject<T>
-
-
Field Summary
Fields Modifier and Type Field Description private JsonReader.BindObject<T>arrayBinder(package private) FormatConverter<T>arrayFormatprivate java.lang.StringformatErrorArrayprivate java.lang.StringformatErrorObject(package private) booleanisObjectFormatFirst(package private) java.lang.reflect.Typemanifestprivate JsonReader.BindObject<T>objectBinder(package private) FormatConverter<T>objectFormat(package private) byte[]quotedTypeNameprivate java.lang.StringstartErrorArrayprivate java.lang.StringstartErrorBothprivate java.lang.StringstartErrorObject(package private) inttypeHash(package private) byte[]typeName
-
Constructor Summary
Constructors Constructor Description FormatDescription(java.lang.reflect.Type manifest, FormatConverter<T> objectFormat, FormatConverter<T> arrayFormat, boolean isObjectFormatFirst, java.lang.String typeName, DslJson json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tbind(JsonReader reader, T instance)Tread(JsonReader reader)voidwrite(JsonWriter writer, T instance)
-
-
-
Field Detail
-
manifest
final java.lang.reflect.Type manifest
-
isObjectFormatFirst
final boolean isObjectFormatFirst
-
objectFormat
final FormatConverter<T> objectFormat
-
objectBinder
private final JsonReader.BindObject<T> objectBinder
-
arrayFormat
final FormatConverter<T> arrayFormat
-
arrayBinder
private final JsonReader.BindObject<T> arrayBinder
-
typeHash
final int typeHash
-
typeName
final byte[] typeName
-
quotedTypeName
final byte[] quotedTypeName
-
startErrorBoth
private final java.lang.String startErrorBoth
-
startErrorObject
private final java.lang.String startErrorObject
-
startErrorArray
private final java.lang.String startErrorArray
-
formatErrorObject
private final java.lang.String formatErrorObject
-
formatErrorArray
private final java.lang.String formatErrorArray
-
-
Constructor Detail
-
FormatDescription
public FormatDescription(java.lang.reflect.Type manifest, @Nullable FormatConverter<T> objectFormat, @Nullable FormatConverter<T> arrayFormat, boolean isObjectFormatFirst, java.lang.String typeName, DslJson json)
-
-
Method Detail
-
write
public final void write(JsonWriter writer, @Nullable T instance)
- Specified by:
writein interfaceJsonWriter.WriteObject<T>
-
read
@Nullable public T read(JsonReader reader) throws java.io.IOException
- Specified by:
readin interfaceJsonReader.ReadObject<T>- Throws:
java.io.IOException
-
bind
public T bind(JsonReader reader, T instance) throws java.io.IOException
- Specified by:
bindin interfaceJsonReader.BindObject<T>- Throws:
java.io.IOException
-
-