Package com.dslplatform.json.runtime
Class ObjectFormatDescription<B,T>
java.lang.Object
com.dslplatform.json.runtime.WriteDescription<T>
com.dslplatform.json.runtime.ObjectFormatDescription<B,T>
- All Implemented Interfaces:
JsonReader.BindObject<B>,JsonReader.ReadObject<T>,JsonWriter.WriteObject<T>,FormatConverter<T>
public final class ObjectFormatDescription<B,T>
extends WriteDescription<T>
implements FormatConverter<T>, JsonReader.BindObject<B>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DecodePropertyInfo<JsonReader.BindObject>[]private final Stringprivate final Settings.Function<B, T> private final booleanprivate static final Settings.Functionprivate final longprivate final Typeprivate final InstanceFactory<B> private final booleanprivate final String -
Constructor Summary
ConstructorsConstructorDescriptionObjectFormatDescription(Type manifest, InstanceFactory<B> newInstance, Settings.Function<B, T> finalize, JsonWriter.WriteObject[] encoders, DecodePropertyInfo<JsonReader.BindObject>[] decoders, DslJson json, boolean skipOnUnknown) -
Method Summary
Modifier and TypeMethodDescriptionbind(JsonReader reader, B instance) private voidbindContent(JsonReader reader, B instance) private voidbindObjectSlow(JsonReader reader, B instance, long currentMandatory) static <D> ObjectFormatDescription<D, D> create(Class<D> manifest, InstanceFactory<D> newInstance, JsonWriter.WriteObject[] encoders, DecodePropertyInfo<JsonReader.BindObject>[] decoders, DslJson json, boolean skipOnUnknown) private voidfinalChecks(JsonReader reader, B instance, long currentMandatory) read(JsonReader reader) readContent(JsonReader reader) private voidskip(JsonReader reader) Methods inherited from class com.dslplatform.json.runtime.WriteDescription
write, writeContentFull, writeContentMinimalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.dslplatform.json.runtime.FormatConverter
writeContentFull, writeContentMinimalMethods inherited from interface com.dslplatform.json.JsonWriter.WriteObject
write
-
Field Details
-
manifest
-
newInstance
-
finalize
-
decoders
-
skipOnUnknown
private final boolean skipOnUnknown -
hasMandatory
private final boolean hasMandatory -
mandatoryFlag
private final long mandatoryFlag -
startError
-
endError
-
identity
-
-
Constructor Details
-
ObjectFormatDescription
public ObjectFormatDescription(Type manifest, InstanceFactory<B> newInstance, Settings.Function<B, T> finalize, JsonWriter.WriteObject[] encoders, DecodePropertyInfo<JsonReader.BindObject>[] decoders, DslJson json, boolean skipOnUnknown)
-
-
Method Details
-
create
public static <D> ObjectFormatDescription<D,D> create(Class<D> manifest, InstanceFactory<D> newInstance, JsonWriter.WriteObject[] encoders, DecodePropertyInfo<JsonReader.BindObject>[] decoders, DslJson json, boolean skipOnUnknown) -
read
- Specified by:
readin interfaceJsonReader.ReadObject<B>- Throws:
IOException
-
bind
- Specified by:
bindin interfaceJsonReader.BindObject<B>- Throws:
IOException
-
readContent
- Specified by:
readContentin interfaceFormatConverter<B>- Throws:
IOException
-
bindContent
- Throws:
IOException
-
bindObjectSlow
private void bindObjectSlow(JsonReader reader, B instance, long currentMandatory) throws IOException - Throws:
IOException
-
finalChecks
- Throws:
IOException
-
skip
- Throws:
IOException
-