Class EnumDefinition

java.lang.Object
no.sikt.graphitron.definitions.objects.AbstractObjectDefinition<graphql.language.EnumTypeDefinition,EnumField>
no.sikt.graphitron.definitions.objects.EnumDefinition
All Implemented Interfaces:
GenerationTarget, ObjectSpecification<EnumField>

public class EnumDefinition extends AbstractObjectDefinition<graphql.language.EnumTypeDefinition,EnumField> implements GenerationTarget
Representation of a GraphQL enum type.
  • Constructor Details

    • EnumDefinition

      public EnumDefinition(graphql.language.EnumTypeDefinition enumTypeDefinition)
  • Method Details

    • createFields

      protected List<EnumField> createFields(graphql.language.EnumTypeDefinition objectDefinition)
      Specified by:
      createFields in class AbstractObjectDefinition<graphql.language.EnumTypeDefinition,EnumField>
    • getEnumReference

      public CodeReference getEnumReference()
      Returns:
      Reference to the external Java enum that should correspond to the one in the schema.
    • hasJavaEnumMapping

      public boolean hasJavaEnumMapping()
      Returns:
      Does this enum map to another enum in the API?
    • processEnumDefinitions

      public static List<EnumDefinition> processEnumDefinitions(List<graphql.language.EnumTypeDefinition> enums)
      Creates instances of this class for each of the EnumTypeDefinition provided.
      Returns:
      List of EnumDefinitions.
    • isGenerated

      public boolean isGenerated()
      Specified by:
      isGenerated in interface GenerationTarget
      Returns:
      Should this object be generated?
    • isGeneratedWithResolver

      public boolean isGeneratedWithResolver()
      Specified by:
      isGeneratedWithResolver in interface GenerationTarget
      Returns:
      Should this object be generated as or containing resolvers?
    • isExplicitlyNotGenerated

      public boolean isExplicitlyNotGenerated()
      Description copied from interface: GenerationTarget
      Does this have the GenerationDirective.NOT_GENERATED directive for skipping generation set?
      Specified by:
      isExplicitlyNotGenerated in interface GenerationTarget