Package graphql.schema.idl
Class NaturalEnumValuesProvider<T extends java.lang.Enum<T>>
- java.lang.Object
-
- graphql.schema.idl.NaturalEnumValuesProvider<T>
-
- All Implemented Interfaces:
EnumValuesProvider
@PublicApi public class NaturalEnumValuesProvider<T extends java.lang.Enum<T>> extends java.lang.Object implements EnumValuesProvider
Simple EnumValuesProvided which maps the GraphQL Enum name to the Java Enum instance.
-
-
Constructor Summary
Constructors Constructor Description NaturalEnumValuesProvider(java.lang.Class<T> enumType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getValue(java.lang.String name)
-
-
-
Constructor Detail
-
NaturalEnumValuesProvider
public NaturalEnumValuesProvider(java.lang.Class<T> enumType)
-
-
Method Detail
-
getValue
public T getValue(java.lang.String name)
- Specified by:
getValue
in interfaceEnumValuesProvider
- Parameters:
name
- an Enum value- Returns:
- not null
-
-