Class EnumMapper
- java.lang.Object
-
- io.leangen.graphql.generator.mapping.common.CachingMapper<graphql.schema.GraphQLEnumType,graphql.schema.GraphQLEnumType>
-
- io.leangen.graphql.generator.mapping.common.EnumMapper
-
- All Implemented Interfaces:
TypeMapper
public class EnumMapper extends CachingMapper<graphql.schema.GraphQLEnumType,graphql.schema.GraphQLEnumType>
- Author:
- Bojan Tomic (kaqqao)
-
-
Field Summary
Fields Modifier and Type Field Description protected JavaDeprecationMappingConfig
javaDeprecationConfig
-
Constructor Summary
Constructors Constructor Description EnumMapper(JavaDeprecationMappingConfig javaDeprecationConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getValueDeprecationReason(Enum<?> value, MessageBundle messageBundle)
protected String
getValueDescription(Enum<?> value, MessageBundle messageBundle)
protected graphql.schema.GraphQLAppliedDirective[]
getValueDirectives(Enum<?> value, OperationMapper operationMapper, BuildContext buildContext)
protected String
getValueName(Enum<?> value, MessageBundle messageBundle)
boolean
supports(AnnotatedElement element, AnnotatedType type)
graphql.schema.GraphQLEnumType
toGraphQLInputType(String typeName, AnnotatedType javaType, TypeMappingEnvironment env)
graphql.schema.GraphQLEnumType
toGraphQLType(String typeName, AnnotatedType javaType, TypeMappingEnvironment env)
-
Methods inherited from class io.leangen.graphql.generator.mapping.common.CachingMapper
getInputTypeName, getTypeName, toGraphQLInputType, toGraphQLType
-
-
-
-
Field Detail
-
javaDeprecationConfig
protected final JavaDeprecationMappingConfig javaDeprecationConfig
-
-
Constructor Detail
-
EnumMapper
public EnumMapper(JavaDeprecationMappingConfig javaDeprecationConfig)
-
-
Method Detail
-
toGraphQLType
public graphql.schema.GraphQLEnumType toGraphQLType(String typeName, AnnotatedType javaType, TypeMappingEnvironment env)
- Specified by:
toGraphQLType
in classCachingMapper<graphql.schema.GraphQLEnumType,graphql.schema.GraphQLEnumType>
-
toGraphQLInputType
public graphql.schema.GraphQLEnumType toGraphQLInputType(String typeName, AnnotatedType javaType, TypeMappingEnvironment env)
- Specified by:
toGraphQLInputType
in classCachingMapper<graphql.schema.GraphQLEnumType,graphql.schema.GraphQLEnumType>
-
getValueName
protected String getValueName(Enum<?> value, MessageBundle messageBundle)
-
getValueDescription
protected String getValueDescription(Enum<?> value, MessageBundle messageBundle)
-
getValueDeprecationReason
protected String getValueDeprecationReason(Enum<?> value, MessageBundle messageBundle)
-
getValueDirectives
protected graphql.schema.GraphQLAppliedDirective[] getValueDirectives(Enum<?> value, OperationMapper operationMapper, BuildContext buildContext)
-
supports
public boolean supports(AnnotatedElement element, AnnotatedType type)
-
-