Class NaturalEnumValuesProvider<T extends java.lang.Enum<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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T getValue​(java.lang.String name)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NaturalEnumValuesProvider

        public NaturalEnumValuesProvider​(java.lang.Class<T> enumType)
    • Method Detail

      • getValue

        public T getValue​(java.lang.String name)
        Specified by:
        getValue in interface EnumValuesProvider
        Parameters:
        name - an Enum value
        Returns:
        not null