public abstract class HashedListAdaptor<T> extends com.google.gson.TypeAdapter<List<T>>
| Constructor and Description |
|---|
HashedListAdaptor() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getFieldName(com.google.gson.stream.JsonWriter writer) |
protected abstract String |
normalizeAndHash(T value,
String fieldName)
Method to normalize and hash the given field and its value.
|
List<T> |
read(com.google.gson.stream.JsonReader reader) |
protected abstract T |
readFromJson(com.google.gson.stream.JsonReader reader)
Type specific method on how to read from Json String.
|
void |
write(com.google.gson.stream.JsonWriter writer,
List<T> input) |
public List<T> read(com.google.gson.stream.JsonReader reader) throws IOException
read in class com.google.gson.TypeAdapter<List<T>>IOExceptionprotected abstract T readFromJson(com.google.gson.stream.JsonReader reader) throws IOException
IOExceptionpublic void write(com.google.gson.stream.JsonWriter writer,
List<T> input)
throws IOException
write in class com.google.gson.TypeAdapter<List<T>>IOExceptionprotected abstract String normalizeAndHash(T value, String fieldName)
protected String getFieldName(com.google.gson.stream.JsonWriter writer) throws NoSuchFieldException, IllegalAccessException
Copyright © 2024. All rights reserved.