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 JavaDeprecationMappingConfigjavaDeprecationConfig
-
Constructor Summary
Constructors Constructor Description EnumMapper(JavaDeprecationMappingConfig javaDeprecationConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetValueDeprecationReason(Enum<?> value, MessageBundle messageBundle)protected StringgetValueDescription(Enum<?> value, MessageBundle messageBundle)protected graphql.schema.GraphQLAppliedDirective[]getValueDirectives(Enum<?> value, OperationMapper operationMapper, BuildContext buildContext)protected StringgetValueName(Enum<?> value, MessageBundle messageBundle)booleansupports(AnnotatedElement element, AnnotatedType type)graphql.schema.GraphQLEnumTypetoGraphQLInputType(String typeName, AnnotatedType javaType, TypeMappingEnvironment env)graphql.schema.GraphQLEnumTypetoGraphQLType(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:
toGraphQLTypein classCachingMapper<graphql.schema.GraphQLEnumType,graphql.schema.GraphQLEnumType>
-
toGraphQLInputType
public graphql.schema.GraphQLEnumType toGraphQLInputType(String typeName, AnnotatedType javaType, TypeMappingEnvironment env)
- Specified by:
toGraphQLInputTypein 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)
-
-