look up the value (ex. {@code 28}) for the mnemonic name (ex. {@code AAAA} ).

@param type type to look up. ex {@code AAAA}
@throws IllegalArgumentException if the type was not configured.
966795
public static Integer lookup(String type) throws IllegalArgumentException {
    checkNotNull(type, "resource type was null");
    checkArgument(lookup.containsKey(type), "%s do not include %s; types: %s",
                  ResourceTypes.class.getSimpleName(),
                  type, EnumSet.allOf(ResourceTypes.class));
    return lookup.get(type);
  }
537946
public final void setTypeName(final String typeName) {
        if (typeName == null) {
            type = LOOKING_AT;
        } else if (typeName.equalsIgnoreCase(TYPES[0])) {
            type = MATCHES;
        } else if (typeName.equalsIgnoreCase(TYPES[1])) {
            type = LOOKING_AT;
        } else if (typeName.equalsIgnoreCase(TYPES[2])) {
            type = FIND;
        }
    }
1347084
public TypeSignature getTypeSignature(Type type) {
		FullTypeSignature typeSignature = getFullTypeSignature(type);
		if (typeSignature != null) {
			return typeSignature;
		}
		if (type instanceof WildcardType) {
			return getTypeArgSignature((WildcardType) type);
		}
		return null;
	}
601185
public void setDataType(String type)  {
        addField(ConfigureNodeFields.type, FormField.Type.text_single);
        setAnswer(ConfigureNodeFields.type.getFieldName(), type);
    }
1310002
@SuppressWarnings({ "unchecked", "rawtypes" })
    protected Type resolveType(Type type) {

        Map<TypeVariable, Type> map = new HashMap<>();
        map.putAll(getTypeVariableMap());

        return ResolvableType.forType(type, new TypeVariableMapVariableResolver(map)).getType();
    }
1052307
public void setFileTypeOrName(String type) {
        fileTypeOrName = type;
        if ((fileAsBufferedImage != null) && !ImageIO.getImageWritersByFormatName(getFileType()).hasNext()) {
            throw new IllegalArgumentException(String.format("No image writer found for format \"%s\"", getFileType()));
        }
    }
535385
function getApparentTypeOfTypeParameter(type) {
            if (!type.resolvedApparentType) {
                var constraintType = getConstraintOfTypeParameter(type);
                while (constraintType && constraintType.flags & 16384 /* TypeParameter */) {
                    constraintType = getConstraintOfTypeParameter(constraintType);
                }
                type.resolvedApparentType = getTypeWithThisArgument(constraintType || emptyObjectType, type);
            }
            return type.resolvedApparentType;
        }
635683
private int calculateTypeId(Class<?> type) {
    if (type == null)
      throw new NullPointerException("type cannot be null");
    return hasher.hash32(type.getName());
  }
51952
public static Converter converterFor( Class type )
    {
        if (!converters.containsKey( type ))
            throw new IllegalArgumentException( "Don't know type: " + type );

        return converters.get( type );
    }
707727
public <T extends Mapping> T findMapping(MappingType type)
    {
        return (T) this.findMapping(type, DEFAULT_PREDICATE);
    }
968101
private Class<?> resolveArgument(Type type) {
    if (type instanceof ParameterizedType) {
      ParameterizedType paramType = (ParameterizedType) type;
      return resolveClass(paramType.getActualTypeArguments()[0]);
    } else if (type instanceof TypeVariable) {
      return resolveClass(type);
    } else if (type instanceof Class) {
      TypeVariable<?>[] typeParams = ((Class<?>) type).getTypeParameters();
      return resolveClass(typeParams[0]);
    }
    return null;
  }
310630
private String getNameForType( Class<?> type )
    {
        if ( _typeToStringMap.containsKey( type ) )
        {
            return _typeToStringMap.get( type );
        }

        for ( Entry<String, Class<?>> entry : _typeMappings.entrySet() )
        {
            if ( entry.getValue().isAssignableFrom( type ) )
            {
                return entry.getKey();
            }
        }
        return null;
    }
698603
public <T> T lookup(String name, Class<T> expectedType) throws Throwable
   {
      if (name == null)
         throw new IllegalArgumentException("Name is null");

      if (expectedType == null)
         throw new IllegalArgumentException("ExpectedType is null");

      if (!started)
         throw new IllegalStateException("Container not started");

      return kernel.getBean(name, expectedType);
   }
909326
public static Type[] getTypeArguments(Type type) {
		if (null == type) {
			return null;
		}

		final ParameterizedType parameterizedType = toParameterizedType(type);
		return (null == parameterizedType) ? null : parameterizedType.getActualTypeArguments();
	}
1022716
public static void register(FilterCriteriaType type) {
        if (REGISTRY.containsKey(type.getName()))
            throw new IllegalStateException(
                    String.format("FilterCriteriaType with name %s is already registered!", type.getName()));
        REGISTRY.put(type.getName(), type);
    }
798735
public void setType(TYPE type) {
    if(type == null) {
      type = TYPE.UNSET;
    }
    this.type = type;
  }
112635
public void registerAsType(Object locator, Class<?> type) {
		if (locator == null)
			throw new NullPointerException("Locator cannot be null");
		if (type == null)
			throw new NullPointerException("Type cannot be null");

		IComponentFactory factory = new DefaultComponentFactory(type);
		_registrations.add(new Registration(locator, factory));
	}