Class EnumMapToObjectTypeAdapter<E extends Enum<E>,V>
- java.lang.Object
-
- io.leangen.graphql.generator.mapping.common.CachingMapper<graphql.schema.GraphQLObjectType,graphql.schema.GraphQLInputObjectType>
-
- io.leangen.graphql.generator.mapping.common.EnumMapToObjectTypeAdapter<E,V>
-
- All Implemented Interfaces:
InputConverter<EnumMap<E,V>,Map<String,V>>,TypeMapper,TypeSubstituter
public class EnumMapToObjectTypeAdapter<E extends Enum<E>,V> extends CachingMapper<graphql.schema.GraphQLObjectType,graphql.schema.GraphQLInputObjectType> implements InputConverter<EnumMap<E,V>,Map<String,V>>
-
-
Constructor Summary
Constructors Constructor Description EnumMapToObjectTypeAdapter(EnumMapper enumMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EnumMap<E,V>convertInput(Map<String,V> substitute, AnnotatedType type, GlobalEnvironment environment, ValueMapper valueMapper)AnnotatedTypegetSubstituteType(AnnotatedType original)The returned type has to erase toClass<S>booleansupports(AnnotatedElement element, AnnotatedType type)booleansupports(AnnotatedType type)protected graphql.schema.GraphQLInputObjectTypetoGraphQLInputType(String typeName, AnnotatedType javaType, TypeMappingEnvironment env)protected graphql.schema.GraphQLObjectTypetoGraphQLType(String typeName, AnnotatedType javaType, TypeMappingEnvironment env)-
Methods inherited from class io.leangen.graphql.generator.mapping.common.CachingMapper
getInputTypeName, getTypeName, toGraphQLInputType, toGraphQLType
-
-
-
-
Constructor Detail
-
EnumMapToObjectTypeAdapter
public EnumMapToObjectTypeAdapter(EnumMapper enumMapper)
-
-
Method Detail
-
toGraphQLType
protected graphql.schema.GraphQLObjectType toGraphQLType(String typeName, AnnotatedType javaType, TypeMappingEnvironment env)
- Specified by:
toGraphQLTypein classCachingMapper<graphql.schema.GraphQLObjectType,graphql.schema.GraphQLInputObjectType>
-
toGraphQLInputType
protected graphql.schema.GraphQLInputObjectType toGraphQLInputType(String typeName, AnnotatedType javaType, TypeMappingEnvironment env)
- Specified by:
toGraphQLInputTypein classCachingMapper<graphql.schema.GraphQLObjectType,graphql.schema.GraphQLInputObjectType>
-
convertInput
public EnumMap<E,V> convertInput(Map<String,V> substitute, AnnotatedType type, GlobalEnvironment environment, ValueMapper valueMapper)
- Specified by:
convertInputin interfaceInputConverter<E extends Enum<E>,V>
-
supports
public boolean supports(AnnotatedType type)
-
supports
public boolean supports(AnnotatedElement element, AnnotatedType type)
- Specified by:
supportsin interfaceTypeMapper
-
getSubstituteType
public AnnotatedType getSubstituteType(AnnotatedType original)
Description copied from interface:InputConverterThe returned type has to erase toClass<S>- Specified by:
getSubstituteTypein interfaceInputConverter<E extends Enum<E>,V>- 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
-
-