public static Type valueOf(String name) {
      Type type = types.get(name);
      if (type == null) {
        throw new IllegalArgumentException(name + " is not a type.");
      }
      return type;
    }
Get the type associated with the given type name.

@param name  the type name

@return the associated type

@throws IllegalArgumentException if the given type name is not associated with any known type
ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java