Class IterableAdapter<T>
- java.lang.Object
-
- io.leangen.graphql.generator.mapping.common.AbstractTypeSubstitutingMapper<List<T>>
-
- io.leangen.graphql.generator.mapping.common.IterableAdapter<T>
-
- All Implemented Interfaces:
InputConverter<Iterable<T>,List<T>>
,TypeMapper
,TypeSubstituter
public class IterableAdapter<T> extends AbstractTypeSubstitutingMapper<List<T>> implements InputConverter<Iterable<T>,List<T>>
-
-
Field Summary
-
Fields inherited from class io.leangen.graphql.generator.mapping.common.AbstractTypeSubstitutingMapper
substituteType
-
-
Constructor Summary
Constructors Constructor Description IterableAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterable<T>
convertInput(List<T> substitute, AnnotatedType type, GlobalEnvironment environment, ValueMapper valueMapper)
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
-
-
-
-
Method Detail
-
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<Iterable<T>,List<T>>
- Specified by:
getSubstituteType
in interfaceTypeSubstituter
- Overrides:
getSubstituteType
in classAbstractTypeSubstitutingMapper<List<T>>
- Parameters:
original
- The type to be replaced- Returns:
- The substitute type to use for mapping
-
convertInput
public Iterable<T> convertInput(List<T> substitute, AnnotatedType type, GlobalEnvironment environment, ValueMapper valueMapper)
- Specified by:
convertInput
in interfaceInputConverter<Iterable<T>,List<T>>
-
supports
public boolean supports(AnnotatedType type)
-
supports
public boolean supports(AnnotatedElement element, AnnotatedType type)
- Specified by:
supports
in interfaceTypeMapper
-
-