Class JsonNodeAdapter
- java.lang.Object
-
- io.leangen.graphql.module.common.jackson.JsonNodeAdapter
-
- All Implemented Interfaces:
InputConverter<com.fasterxml.jackson.databind.JsonNode,Object>,OutputConverter<com.fasterxml.jackson.databind.JsonNode,Object>,TypeMapper,TypeSubstituter
public class JsonNodeAdapter extends Object implements TypeMapper, InputConverter<com.fasterxml.jackson.databind.JsonNode,Object>, OutputConverter<com.fasterxml.jackson.databind.JsonNode,Object>
-
-
Constructor Summary
Constructors Constructor Description JsonNodeAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.JsonNodeconvertInput(Object substitute, AnnotatedType type, GlobalEnvironment environment, ValueMapper valueMapper)ObjectconvertOutput(com.fasterxml.jackson.databind.JsonNode original, AnnotatedType type, ResolutionEnvironment resolutionEnvironment)AnnotatedTypegetSubstituteType(AnnotatedType original)The returned type has to erase toClass<S>booleansupports(AnnotatedElement element, AnnotatedType type)booleansupports(AnnotatedType type)graphql.schema.GraphQLInputTypetoGraphQLInputType(AnnotatedType javaType, Set<Class<? extends TypeMapper>> mappersToSkip, TypeMappingEnvironment env)graphql.schema.GraphQLOutputTypetoGraphQLType(AnnotatedType javaType, Set<Class<? extends TypeMapper>> mappersToSkip, TypeMappingEnvironment env)
-
-
-
Method Detail
-
convertInput
public com.fasterxml.jackson.databind.JsonNode convertInput(Object substitute, AnnotatedType type, GlobalEnvironment environment, ValueMapper valueMapper)
- Specified by:
convertInputin interfaceInputConverter<com.fasterxml.jackson.databind.JsonNode,Object>
-
getSubstituteType
public AnnotatedType getSubstituteType(AnnotatedType original)
Description copied from interface:InputConverterThe returned type has to erase toClass<S>- Specified by:
getSubstituteTypein interfaceInputConverter<com.fasterxml.jackson.databind.JsonNode,Object>- Specified by:
getSubstituteTypein interfaceTypeSubstituter- Parameters:
original- The original type of the input value- Returns:
- The type of the input value this converter produces for the given original type
-
convertOutput
public Object convertOutput(com.fasterxml.jackson.databind.JsonNode original, AnnotatedType type, ResolutionEnvironment resolutionEnvironment)
- Specified by:
convertOutputin interfaceOutputConverter<com.fasterxml.jackson.databind.JsonNode,Object>
-
toGraphQLType
public graphql.schema.GraphQLOutputType toGraphQLType(AnnotatedType javaType, Set<Class<? extends TypeMapper>> mappersToSkip, TypeMappingEnvironment env)
- Specified by:
toGraphQLTypein interfaceTypeMapper
-
toGraphQLInputType
public graphql.schema.GraphQLInputType toGraphQLInputType(AnnotatedType javaType, Set<Class<? extends TypeMapper>> mappersToSkip, TypeMappingEnvironment env)
- Specified by:
toGraphQLInputTypein interfaceTypeMapper
-
supports
public boolean supports(AnnotatedType type)
- Specified by:
supportsin interfaceInputConverter<com.fasterxml.jackson.databind.JsonNode,Object>
-
supports
public boolean supports(AnnotatedElement element, AnnotatedType type)
- Specified by:
supportsin interfaceOutputConverter<com.fasterxml.jackson.databind.JsonNode,Object>- Specified by:
supportsin interfaceTypeMapper
-
-