Class StreamToCollectionTypeAdapter<T>
- java.lang.Object
-
- io.leangen.graphql.generator.mapping.common.AbstractTypeSubstitutingMapper<S>
-
- io.leangen.graphql.generator.mapping.AbstractTypeAdapter<T,S>
-
- io.leangen.graphql.generator.mapping.AbstractSimpleTypeAdapter<Stream<T>,List<T>>
-
- io.leangen.graphql.generator.mapping.common.StreamToCollectionTypeAdapter<T>
-
- All Implemented Interfaces:
DelegatingOutputConverter<Stream<T>,List<T>>
,InputConverter<Stream<T>,List<T>>
,OutputConverter<Stream<T>,List<T>>
,TypeMapper
,TypeSubstituter
public class StreamToCollectionTypeAdapter<T> extends AbstractSimpleTypeAdapter<Stream<T>,List<T>> implements DelegatingOutputConverter<Stream<T>,List<T>>
- Author:
- Bojan Tomic (kaqqao)
-
-
Field Summary
-
Fields inherited from class io.leangen.graphql.generator.mapping.AbstractSimpleTypeAdapter
rawSourceType
-
Fields inherited from class io.leangen.graphql.generator.mapping.AbstractTypeAdapter
sourceType
-
Fields inherited from class io.leangen.graphql.generator.mapping.common.AbstractTypeSubstitutingMapper
substituteType
-
-
Constructor Summary
Constructors Constructor Description StreamToCollectionTypeAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream<T>
convertInput(List<T> substitute, AnnotatedType type, GlobalEnvironment environment, ValueMapper valueMapper)
List<T>
convertOutput(Stream<T> original, AnnotatedType type, ResolutionEnvironment env)
List<AnnotatedType>
getDerivedTypes(AnnotatedType streamType)
AnnotatedType
getSubstituteType(AnnotatedType original)
Returns the type to map instead of the original.-
Methods inherited from class io.leangen.graphql.generator.mapping.AbstractSimpleTypeAdapter
supports
-
Methods inherited from class io.leangen.graphql.generator.mapping.AbstractTypeAdapter
supports
-
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
-
Methods inherited from interface io.leangen.graphql.generator.mapping.OutputConverter
supports
-
-
-
-
Method Detail
-
convertOutput
public List<T> convertOutput(Stream<T> original, AnnotatedType type, ResolutionEnvironment env)
- Specified by:
convertOutput
in interfaceOutputConverter<Stream<T>,List<T>>
-
convertInput
public Stream<T> convertInput(List<T> substitute, AnnotatedType type, GlobalEnvironment environment, ValueMapper valueMapper)
- Specified by:
convertInput
in interfaceInputConverter<Stream<T>,List<T>>
-
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<Stream<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
-
getDerivedTypes
public List<AnnotatedType> getDerivedTypes(AnnotatedType streamType)
- Specified by:
getDerivedTypes
in interfaceDelegatingOutputConverter<Stream<T>,List<T>>
-
-