* @throws ConfigurationException if {@code type} contains a type variable
*/
public static <T> TypeLiteral<T> makeKeySafe(TypeLiteral<T> type) {
if (!isFullySpecified(type.getType())) {
String message = type + " cannot be used as a key; It is not fully specified.";
throw new ConfigurationException(ImmutableSet.of(new Message(message)));
}
@SuppressWarnings("unchecked")
TypeLiteral<T> wrappedPrimitives = (TypeLiteral<T>) PRIMITIVE_TO_WRAPPER.get(type);
return wrappedPrimitives != null