code: public <T extends Enum<T>> ThriftEnumMetadata<?> getThriftEnumMetadata(Class<?> enumClass)
      {
          ThriftEnumMetadata<?> enumMetadata = enums.get(enumClass);
          if (enumMetadata == null) {
              enumMetadata = new ThriftEnumMetadataBuilder<>((Class<T>) enumClass).build();
  
              ThriftEnumMetadata<?> current = enums.putIfAbsent(enumClass, enumMetadata);
              if (current != null) {
                  enumMetadata = current;
              }
          }
          return enumMetadata;
      }
docs: Gets the ThriftEnumMetadata for the specified enum class.  If the enum class contains a method
  annotated with @ThriftEnumValue, the value of this method will be used for the encoded thrift
  value; otherwise the Enum.ordinal() method will be used.