public class GsonValueMapper extends Object implements ValueMapper, InputFieldBuilder
TYPE_METADATA_FIELD_NAME| Modifier and Type | Method and Description |
|---|---|
protected Object |
defaultValue(Field field,
AnnotatedType fieldType,
GlobalEnvironment environment) |
<T> T |
fromInput(Object graphQLInput,
Type sourceType,
AnnotatedType outputType) |
<T> T |
fromString(String json,
AnnotatedType type) |
protected String |
getDescription(Field field,
MessageBundle messageBundle) |
Set<InputField> |
getInputFields(InputFieldBuilderParams params)
Unlike Jackson, Gson doesn't expose any of its metadata, so this method is more or less a
reimplementation of
ReflectiveTypeAdapterFactory.getBoundFields(Gson, com.google.gson.reflect.TypeToken, Class) |
protected TypedElement |
reduce(AnnotatedType declaringType,
Field field,
TypeTransformer transformer) |
boolean |
supports(AnnotatedType type) |
String |
toString(Object output,
AnnotatedType type) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfromInputpublic <T> T fromInput(Object graphQLInput, Type sourceType, AnnotatedType outputType) throws InputParsingException
fromInput in interface ValueMapperInputParsingExceptionpublic <T> T fromString(String json, AnnotatedType type)
fromString in interface ValueMapperpublic String toString(Object output, AnnotatedType type)
toString in interface ValueMapperpublic Set<InputField> getInputFields(InputFieldBuilderParams params)
ReflectiveTypeAdapterFactory.getBoundFields(Gson, com.google.gson.reflect.TypeToken, Class)getInputFields in interface InputFieldBuilderparams - The parameters available to the discovery strategyAnnotatedTypeprotected TypedElement reduce(AnnotatedType declaringType, Field field, TypeTransformer transformer)
protected String getDescription(Field field, MessageBundle messageBundle)
protected Object defaultValue(Field field, AnnotatedType fieldType, GlobalEnvironment environment)
public boolean supports(AnnotatedType type)
supports in interface InputFieldBuilderCopyright © 2016–2019. All rights reserved.