Class JavaListSchema
-
- All Implemented Interfaces:
-
dev.drtheo.autojson.schema.base.ArraySchema,dev.drtheo.autojson.schema.base.ArraySchema.Simple,dev.drtheo.autojson.schema.base.Schema
public class JavaListSchema<T> implements ArraySchema.Simple<T>
-
-
Constructor Summary
Constructors Constructor Description JavaListSchema(SchemaHolder holder, ParameterizedType type)
-
Method Summary
Modifier and Type Method Description <To> voidserialize(JsonAdapter<Object, To> auto, JsonSerializationContext.Array c, List<T> ts)List<T>instantiate()<To> List<T>deserialize(JsonAdapter<Object, To> auto, JsonDeserializationContext c, List<T> o, int index)-
Methods inherited from class dev.drtheo.autojson.schema.base.ArraySchema.Simple
pack -
Methods inherited from class dev.drtheo.autojson.schema.base.ArraySchema
pack, serialize, type -
Methods inherited from class dev.drtheo.autojson.schema.base.Schema
asArray, asObject, asPrimitive, asWrapper, createInstance -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
JavaListSchema
JavaListSchema(SchemaHolder holder, ParameterizedType type)
-
-
Method Detail
-
serialize
<To> void serialize(JsonAdapter<Object, To> auto, JsonSerializationContext.Array c, List<T> ts)
-
instantiate
List<T> instantiate()
- Returns:
a new instance of the Intermediary type.
-
deserialize
<To> List<T> deserialize(JsonAdapter<Object, To> auto, JsonDeserializationContext c, List<T> o, int index)
- Parameters:
o- the object you're deserializing the data into.index- the index of the element, maintaining the order used for serialization in serialize.- Returns:
the new Intermediary value.
-
-
-
-