code: public <T extends Enum<T>> T getEnum(String name, Class<T> declaringClass) {
      final String val = get(name);
      Preconditions.checkNotNull(val);
      return Enum.valueOf(declaringClass, val);
    }
docs: Return value matching this enumerated type.
  @param name Property name
  @throws NullPointerException if the configuration property does not exist
  @throws IllegalArgumentException If mapping is illegal for the type
  provided