T
- the type of the objectpublic interface OdinImmutableAdapter<T> extends OdinAdapter<T>
This adapter can be used if you need to pass some content to the object constructor when you deserialize it.
If your object contains an empty constructor or can use null as default value for the object fields, use OdinObjectAdapter
.
Modifier and Type | Method and Description |
---|---|
T |
read(OdinReader reader,
ObjectType<? extends T> type) |
void |
write(OdinWriter writer,
ObjectType<? extends T> type,
T o) |
T read(OdinReader reader, ObjectType<? extends T> type) throws java.io.IOException
java.io.IOException
void write(OdinWriter writer, ObjectType<? extends T> type, T o) throws java.io.IOException
java.io.IOException