Class JsonArrayAdapter
- java.lang.Object
-
- io.leangen.graphql.generator.mapping.common.AbstractTypeSubstitutingMapper<List<com.fasterxml.jackson.databind.JsonNode>>
-
- io.leangen.graphql.module.common.jackson.JsonArrayAdapter
-
- All Implemented Interfaces:
DelegatingOutputConverter<com.fasterxml.jackson.databind.node.ArrayNode,List>
,InputConverter<com.fasterxml.jackson.databind.node.ArrayNode,List<com.fasterxml.jackson.databind.JsonNode>>
,OutputConverter<com.fasterxml.jackson.databind.node.ArrayNode,List>
,TypeMapper
,TypeSubstituter
public class JsonArrayAdapter extends AbstractTypeSubstitutingMapper<List<com.fasterxml.jackson.databind.JsonNode>> implements InputConverter<com.fasterxml.jackson.databind.node.ArrayNode,List<com.fasterxml.jackson.databind.JsonNode>>, DelegatingOutputConverter<com.fasterxml.jackson.databind.node.ArrayNode,List>
-
-
Field Summary
-
Fields inherited from class io.leangen.graphql.generator.mapping.common.AbstractTypeSubstitutingMapper
substituteType
-
-
Constructor Summary
Constructors Constructor Description JsonArrayAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.node.ArrayNode
convertInput(List<com.fasterxml.jackson.databind.JsonNode> substitute, AnnotatedType type, GlobalEnvironment environment, ValueMapper valueMapper)
List
convertOutput(com.fasterxml.jackson.databind.node.ArrayNode original, AnnotatedType type, ResolutionEnvironment resolutionEnvironment)
List<AnnotatedType>
getDerivedTypes(AnnotatedType type)
AnnotatedType
getSubstituteType(AnnotatedType original)
Returns the type to map instead of the original.boolean
supports(AnnotatedElement element, AnnotatedType type)
boolean
supports(AnnotatedType type)
-
Methods inherited from class io.leangen.graphql.generator.mapping.common.AbstractTypeSubstitutingMapper
toGraphQLInputType, toGraphQLType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.leangen.graphql.generator.mapping.DelegatingOutputConverter
isTransparent
-
-
-
-
Method Detail
-
convertInput
public com.fasterxml.jackson.databind.node.ArrayNode convertInput(List<com.fasterxml.jackson.databind.JsonNode> substitute, AnnotatedType type, GlobalEnvironment environment, ValueMapper valueMapper)
- Specified by:
convertInput
in interfaceInputConverter<com.fasterxml.jackson.databind.node.ArrayNode,List<com.fasterxml.jackson.databind.JsonNode>>
-
getSubstituteType
public AnnotatedType getSubstituteType(AnnotatedType original)
Description copied from class:AbstractTypeSubstitutingMapper
Returns the type to map instead of the original. This implementation always returns the type of the generic type parameterS
.- Specified by:
getSubstituteType
in interfaceInputConverter<com.fasterxml.jackson.databind.node.ArrayNode,List<com.fasterxml.jackson.databind.JsonNode>>
- Specified by:
getSubstituteType
in interfaceTypeSubstituter
- Overrides:
getSubstituteType
in classAbstractTypeSubstitutingMapper<List<com.fasterxml.jackson.databind.JsonNode>>
- Parameters:
original
- The type to be replaced- Returns:
- The substitute type to use for mapping
-
convertOutput
public List convertOutput(com.fasterxml.jackson.databind.node.ArrayNode original, AnnotatedType type, ResolutionEnvironment resolutionEnvironment)
- Specified by:
convertOutput
in interfaceOutputConverter<com.fasterxml.jackson.databind.node.ArrayNode,List>
-
getDerivedTypes
public List<AnnotatedType> getDerivedTypes(AnnotatedType type)
- Specified by:
getDerivedTypes
in interfaceDelegatingOutputConverter<com.fasterxml.jackson.databind.node.ArrayNode,List>
-
supports
public boolean supports(AnnotatedType type)
- Specified by:
supports
in interfaceInputConverter<com.fasterxml.jackson.databind.node.ArrayNode,List<com.fasterxml.jackson.databind.JsonNode>>
-
supports
public boolean supports(AnnotatedElement element, AnnotatedType type)
- Specified by:
supports
in interfaceOutputConverter<com.fasterxml.jackson.databind.node.ArrayNode,List>
- Specified by:
supports
in interfaceTypeMapper
-
-