Class PublisherAdapter<T>
- java.lang.Object
-
- io.leangen.graphql.generator.mapping.common.AbstractTypeSubstitutingMapper<Object>
-
- io.leangen.graphql.generator.mapping.core.PublisherAdapter<T>
-
- All Implemented Interfaces:
OutputConverter<org.reactivestreams.Publisher<T>,Object>,SchemaTransformer,TypeMapper,TypeSubstituter
public class PublisherAdapter<T> extends AbstractTypeSubstitutingMapper<Object> implements SchemaTransformer, OutputConverter<org.reactivestreams.Publisher<T>,Object>
-
-
Field Summary
-
Fields inherited from class io.leangen.graphql.generator.mapping.common.AbstractTypeSubstitutingMapper
substituteType
-
-
Constructor Summary
Constructors Constructor Description PublisherAdapter()PublisherAdapter(Executor executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectconvertOutput(org.reactivestreams.Publisher<T> original, AnnotatedType type, ResolutionEnvironment resolutionEnvironment)protected ObjectconvertOutputForNonSubscription(org.reactivestreams.Publisher<T> original, AnnotatedType type, ResolutionEnvironment resolutionEnvironment)AnnotatedTypegetSubstituteType(AnnotatedType original)Returns the type to map instead of the original.booleansupports(AnnotatedElement element, AnnotatedType type)graphql.schema.GraphQLInputTypetoGraphQLInputType(AnnotatedType javaType, Set<Class<? extends TypeMapper>> mappersToSkip, TypeMappingEnvironment env)graphql.schema.GraphQLFieldDefinitiontransformField(graphql.schema.GraphQLFieldDefinition field, Operation operation, OperationMapper operationMapper, BuildContext buildContext)-
Methods inherited from class io.leangen.graphql.generator.mapping.common.AbstractTypeSubstitutingMapper
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.SchemaTransformer
transformArgument, transformArgument, transformArgument, transformDirective, transformDirective, transformInputField
-
-
-
-
Constructor Detail
-
PublisherAdapter
public PublisherAdapter()
-
PublisherAdapter
public PublisherAdapter(Executor executor)
-
-
Method Detail
-
toGraphQLInputType
public graphql.schema.GraphQLInputType toGraphQLInputType(AnnotatedType javaType, Set<Class<? extends TypeMapper>> mappersToSkip, TypeMappingEnvironment env)
- Specified by:
toGraphQLInputTypein interfaceTypeMapper- Overrides:
toGraphQLInputTypein classAbstractTypeSubstitutingMapper<Object>
-
getSubstituteType
public AnnotatedType getSubstituteType(AnnotatedType original)
Description copied from class:AbstractTypeSubstitutingMapperReturns the type to map instead of the original. This implementation always returns the type of the generic type parameterS.- Specified by:
getSubstituteTypein interfaceTypeSubstituter- Overrides:
getSubstituteTypein classAbstractTypeSubstitutingMapper<Object>- Parameters:
original- The type to be replaced- Returns:
- The substitute type to use for mapping
-
transformField
public graphql.schema.GraphQLFieldDefinition transformField(graphql.schema.GraphQLFieldDefinition field, Operation operation, OperationMapper operationMapper, BuildContext buildContext)- Specified by:
transformFieldin interfaceSchemaTransformer
-
convertOutput
public Object convertOutput(org.reactivestreams.Publisher<T> original, AnnotatedType type, ResolutionEnvironment resolutionEnvironment)
- Specified by:
convertOutputin interfaceOutputConverter<org.reactivestreams.Publisher<T>,Object>
-
convertOutputForNonSubscription
protected Object convertOutputForNonSubscription(org.reactivestreams.Publisher<T> original, AnnotatedType type, ResolutionEnvironment resolutionEnvironment)
-
supports
public boolean supports(AnnotatedElement element, AnnotatedType type)
- Specified by:
supportsin interfaceOutputConverter<org.reactivestreams.Publisher<T>,Object>- Specified by:
supportsin interfaceTypeMapper
-
-