@PublicApi public class GraphQLEnumType extends java.lang.Object implements GraphQLType, GraphQLInputType, GraphQLOutputType, GraphQLUnmodifiedType, GraphQLNullableType, GraphQLDirectiveContainer
| Modifier and Type | Class and Description |
|---|---|
static class |
GraphQLEnumType.Builder |
| Constructor and Description |
|---|
GraphQLEnumType(java.lang.String name,
java.lang.String description,
java.util.List<GraphQLEnumValueDefinition> values) |
GraphQLEnumType(java.lang.String name,
java.lang.String description,
java.util.List<GraphQLEnumValueDefinition> values,
java.util.List<GraphQLDirective> directives,
EnumTypeDefinition definition) |
| Modifier and Type | Method and Description |
|---|---|
TraversalControl |
accept(TraverserContext<GraphQLType> context,
GraphQLTypeVisitor visitor)
Double-dispatch entry point.
|
java.util.List<GraphQLType> |
getChildren() |
Coercing |
getCoercing() |
EnumTypeDefinition |
getDefinition() |
java.lang.String |
getDescription() |
java.util.List<GraphQLDirective> |
getDirectives() |
java.lang.String |
getName() |
GraphQLEnumValueDefinition |
getValue(java.lang.String name) |
java.util.List<GraphQLEnumValueDefinition> |
getValues() |
static GraphQLEnumType.Builder |
newEnum() |
static GraphQLEnumType.Builder |
newEnum(GraphQLEnumType existing) |
GraphQLEnumType |
transform(java.util.function.Consumer<GraphQLEnumType.Builder> builderConsumer)
This helps you transform the current GraphQLEnumType into another one by starting a builder with all
the current values and allows you to transform it how you want.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDirective, getDirectivesByNamepublic GraphQLEnumType(java.lang.String name,
java.lang.String description,
java.util.List<GraphQLEnumValueDefinition> values)
public GraphQLEnumType(java.lang.String name,
java.lang.String description,
java.util.List<GraphQLEnumValueDefinition> values,
java.util.List<GraphQLDirective> directives,
EnumTypeDefinition definition)
public java.util.List<GraphQLEnumValueDefinition> getValues()
public GraphQLEnumValueDefinition getValue(java.lang.String name)
public java.lang.String getName()
getName in interface GraphQLType[_A-Za-z][_0-9A-Za-z]*public java.lang.String getDescription()
public Coercing getCoercing()
public EnumTypeDefinition getDefinition()
public java.util.List<GraphQLDirective> getDirectives()
getDirectives in interface GraphQLDirectiveContainerpublic GraphQLEnumType transform(java.util.function.Consumer<GraphQLEnumType.Builder> builderConsumer)
builderConsumer - the consumer code that will be given a builder to transformpublic TraversalControl accept(TraverserContext<GraphQLType> context, GraphQLTypeVisitor visitor)
GraphQLTypeNode, see accept(...) for more details about the pattern.accept in interface GraphQLTypecontext - TraverserContext bound to this graphQL type objectvisitor - Visitor instance that performs actual processing on the types(s)public java.util.List<GraphQLType> getChildren()
getChildren in interface GraphQLTypepublic static GraphQLEnumType.Builder newEnum()
public static GraphQLEnumType.Builder newEnum(GraphQLEnumType existing)