code: public <T extends Enum<T>> T lookupEnum(Class<T> type, String name) {
          if (type == null) {
              throw new IllegalArgumentException("type must not be null");
          }
          if (name == null) {
              throw new IllegalArgumentException("name must not be null");
          }
          Map<String, Enum<?>> map = getEnumRenames(type);
          Enum<?> value = map.get(name);
          if (value != null) {
              return type.cast(value);
          }
          return Enum.valueOf(type, name);
      }
docs: Lookup an enum from a name, handling renames.
  
  @param <T>  the type of the desired enum
  @param type  the enum type, not null
  @param name  the name of the enum to lookup, not null
  @return the enum value, not null
  @throws IllegalArgumentException if the name is not a valid enum constant