Get Java primitive wrapping type Transformable.

@param type
the type
@return the language transform
427330
static SQLTransform getLanguageTransform(TypeName type) {
		String typeName = type.toString();

		if (Integer.class.getCanonicalName().equals(typeName)) {
			return new IntegerSQLTransform(true);
		}
		if (Boolean.class.getCanonicalName().equals(typeName)) {
			return new BooleanSQLTransform(true);
		}
		if (Long.class.getCanonicalName().equals(typeName)) {
			return new LongSQLTransform(true);
		}
		if (Double.class.getCanonicalName().equals(typeName)) {
			return new DoubleSQLTransform(true);
		}
		if (Float.class.getCanonicalName().equals(typeName)) {
			return new FloatSQLTransform(true);
		}
		if (Short.class.getCanonicalName().equals(typeName)) {
			return new ShortSQLTransform(true);
		}
		if (Byte.class.getCanonicalName().equals(typeName)) {
			return new ByteSQLTransform(true);
		}
		if (Character.class.getCanonicalName().equals(typeName)) {
			return new CharacterSQLTransform(true);
		}
		if (String.class.getCanonicalName().equals(typeName)) {
			return new StringSQLTransform();
		}
		return null;
	}
863338
public static GraphQLUnmodifiedType unwrapAll(GraphQLType type) {
        while (true) {
            if (isNotWrapped(type)) {
                return (GraphQLUnmodifiedType) type;
            }
            type = unwrapOne(type);
        }
    }
592214
public static @NotNull <T> Class<T> wrap(@NotNull Class<T> type) {
        Class<?> result =
               (type == boolean.class) ? Boolean.class
             : (type == byte.class)    ? Byte.class
             : (type == char.class)    ? Character.class
             : (type == short.class)   ? Short.class
             : (type == int.class)     ? Integer.class
             : (type == long.class)    ? Long.class
             : (type == float.class)   ? Float.class
             : (type == double.class)  ? Double.class
             : type;

        @SuppressWarnings("unchecked")
        Class<T> casted = (Class<T>) result;
        return casted;
    }
550305
public static <T> Class<T> unwrap(Class<T> type) {
        if (type == null) {
            throw new IllegalArgumentException();
        }

        Class<T> unwrapped = (Class<T>) WRAP_TO_PRIMITIVE.get(type);
        return (unwrapped == null) ? type : unwrapped;
    }
1165942
public Optional<MapperInstance> getSerializer( JType type ) {
        return Optional.fromNullable( serializers.get( type.getQualifiedSourceName() ) );
    }
999206
public static String getCharsetFromContentType(String type) {
    	init();
        if (type == null) {
            return null;
        }

        int semi = type.indexOf(";");

        if (semi == -1) {
            return null;
        }

        String afterSemi = type.substring(semi + 1);

        int charsetLocation = afterSemi.indexOf("charset=");

        if (charsetLocation == -1) {
            return null;
        }

        return afterSemi.substring(charsetLocation + 8).trim();
    }
995203
public ImmutableMap<String, Node> getTypeTransformations() {
    if (info == null || info.typeTransformations == null) {
      return ImmutableMap.<String, Node>of();
    }
    return ImmutableMap.copyOf(info.typeTransformations);
  }
1356346
public Optional<MapperInstance> getDeserializer( JType type ) {
        return Optional.fromNullable( deserializers.get( type.getQualifiedSourceName() ) );
    }
929011
public static Class getWrapperType(Class primitiveType) {
        if (primitiveType.isPrimitive()) {
            return PRIMITIVES_TO_WRAPPERS.get(primitiveType);
        }
        return primitiveType;
    }
689852
public static boolean isPrimitive(Class<?> type) {
		if (type.isPrimitive()) {
			return true;
		}
		// check if wrapper;
		if (PRIMITIVES_TO_WRAPPERS.values().contains(type)) {
			return true;
		}
		return false;
	}
65542
public static TypeConverter converterForType(Class type)
    {
        for (TypeConverter converter : converters)
        {
            if (converter.canConvertTo( type )) return converter;
        }

        return null;
    }
560623
public static Type toType(String type) throws TransformerException {
	if (type == null) return OBJECT;
	type = type.trim();
	String lcType = StringUtil.toLowerCase(type);
	char first = lcType.charAt(0);

	switch (first) {
	case 'a':
	    if ("any".equals(lcType)) return OBJECT;
	    if ("array".equals(lcType)) return ARRAY;
	    break;
	case 'b':
	    if ("base64".equals(lcType)) return STRING;
	    if ("binary".equals(lcType)) return BYTE_VALUE_ARRAY;
	    if ("bool".equals(lcType) || "boolean".equals(type)) return BOOLEAN_VALUE;
	    if ("boolean".equals(lcType)) return BOOLEAN;
	    if ("byte".equals(type)) return BYTE_VALUE;
	    if ("byte".equals(lcType)) return BYTE;
	    break;
	case 'c':
	    if ("char".equals(lcType)) return CHAR;
	    if ("character".equals(lcType)) return CHARACTER;
	    if ("collection".equals(lcType)) return BYTE_VALUE_ARRAY;
	    if ("component".equals(lcType)) return COMPONENT;
	    if ("class".equals(lcType)) return COMPONENT;
	    break;
	case 'd':
	    if ("date".equals(lcType) || "datetime".equals(lcType)) return DATE_TIME;
	    if ("decimal".equals(lcType)) return STRING;
	    if ("double".equals(type)) return DOUBLE_VALUE;
	    if ("double".equals(lcType)) return DOUBLE;
	    break;
	case 'e':
	    // if("excel".equals(lcType)) return EXCEL;
	    break;
	case 'f':
	    if ("file".equals(lcType)) return FILE;
	    if ("float".equals(type)) return FLOAT_VALUE;
	    if ("float".equals(lcType)) return FLOAT;
	    if ("function".equals(lcType)) return UDF;
	    break;
	case 'i':
	    if ("int".equals(lcType)) return INT_VALUE;
	    else if ("integer".equals(lcType)) return INTEGER;
	    // ext.img else if("image".equals(lcType)) return ImageUtil.getImageType();
	    break;
	case 'j':
	    if ("java.lang.boolean".equals(lcType)) return BOOLEAN;
	    if ("java.lang.byte".equals(lcType)) return BYTE;
	    if ("java.lang.character".equals(lcType)) return CHARACTER;
	    if ("java.lang.short".equals(lcType)) return SHORT;
	    if ("java.lang.integer".equals(lcType)) return INTEGER;
	    if ("java.lang.long".equals(lcType)) return LONG;
	    if ("java.lang.float".equals(lcType)) return FLOAT;
	    if ("java.lang.double".equals(lcType)) return DOUBLE;
	    if ("java.io.file".equals(lcType)) return FILE;
	    if ("java.lang.string".equals(lcType)) return STRING;
	    if ("java.lang.string[]".equals(lcType)) return STRING_ARRAY;
	    if ("java.util.date".equals(lcType)) return DATE;
	    if ("java.lang.object".equals(lcType)) return OBJECT;
	    break;
	case 'l':
	    if ("long".equals(type)) return LONG_VALUE;
	    if ("long".equals(lcType)) return LONG;
	    if ("locale".equals(lcType)) return LOCALE;
	    if ("lucee.runtime.type.Collection$Key".equals(type)) return COLLECTION_KEY;
	    break;
	case 'n':
	    if ("node".equals(lcType)) return NODE;
	    if ("number".equals(lcType)) return DOUBLE_VALUE;
	    if ("numeric".equals(lcType)) return DOUBLE_VALUE;
	    break;
	case 'o':
	    if ("object".equals(lcType)) return OBJECT;
	    break;
	case 'q':
	    if ("query".equals(lcType)) return QUERY;
	    if ("querycolumn".equals(lcType)) return QUERY_COLUMN;
	    break;
	case 's':
	    if ("string".equals(lcType)) return STRING;
	    if ("struct".equals(lcType)) return STRUCT;
	    if ("short".equals(type)) return SHORT_VALUE;
	    if ("short".equals(lcType)) return SHORT;
	    break;
	case 't':
	    if ("timezone".equals(lcType)) return TIMEZONE;
	    if ("timespan".equals(lcType)) return TIMESPAN;
	    break;
	case 'u':
	    if ("udf".equals(lcType)) return UDF;
	    break;
	case 'v':
	    if ("void".equals(lcType)) return VOID;
	    if ("variablestring".equals(lcType)) return STRING;
	    if ("variable_string".equals(lcType)) return STRING;
	    break;
	case 'x':
	    if ("xml".equals(lcType)) return NODE;
	    break;
	case '[':
	    if ("[Ljava.lang.String;".equals(lcType)) return STRING_ARRAY;
	    break;

	}
	// TODO Array als Lbyte und auch byte[]

	try {
	    return Type.getType(ClassUtil.loadClass(type));
	}
	catch (ClassException e) {
	    throw new TransformerException(e, null);
	}
    }
115187
@SuppressWarnings("static-method")
	protected List<JvmTypeParameter> getTypeParametersFor(XtendTypeDeclaration type) {
		if (type instanceof XtendClass) {
			return ((XtendClass) type).getTypeParameters();
		}
		if (type instanceof XtendInterface) {
			return ((XtendInterface) type).getTypeParameters();
		}
		return Collections.emptyList();
	}
840154
private static PrefsTransform getTransform(TypeName typeName) {
		if (typeName.isPrimitive()) {
			return getPrimitiveTransform(typeName);
		}

		if (typeName instanceof ArrayTypeName) {
			ArrayTypeName typeNameArray = (ArrayTypeName) typeName;
			TypeName componentTypeName = typeNameArray.componentType;

			if (TypeUtility.isEquals(componentTypeName, Byte.TYPE.toString())) {
				return new ByteArrayPrefsTransform();
			} else {
				return new ArrayPrefsTransform();
			}
		} else if (typeName instanceof ParameterizedTypeName) {
			ParameterizedTypeName parameterizedTypeName = (ParameterizedTypeName) typeName;
			if (TypeUtility.isList(parameterizedTypeName)) {
				return new ListPrefsTransformation();
			} else if (TypeUtility.isSet(parameterizedTypeName)) {
				return new SetPrefsTransformation();
			} else if (TypeUtility.isMap(parameterizedTypeName)) {
				return new MapPrefsTransformation();
			}
		}

		PrefsTransform transform;

		transform = getLanguageTransform(typeName);
		if (transform != null) {
			return transform;
		}

		transform = getUtilTransform(typeName);
		if (transform != null) {
			return transform;
		}

		transform = getMathTransform(typeName);
		if (transform != null) {
			return transform;
		}

		transform = getNetTransform(typeName);
		if (transform != null) {
			return transform;
		}

		transform = getSqlTransform(typeName);
		if (transform != null) {
			return transform;
		}

		if (TypeUtility.isEnum(typeName)) {
			return new EnumPrefsTransform(typeName);
		}

		return new ObjectPrefsTransform();
	}
1328555
public Optional<MapperInstance> getKeyDeserializer( JType type ) {
        return Optional.fromNullable( keyDeserializers.get( type.getQualifiedSourceName() ) );
    }
372471
private static BaseTypeConverter lookupTypeConverter(Class type) {
        BaseTypeConverter converter = (BaseTypeConverter)TYPE_CONVERTERS.get(type);
        if(converter == null) {
            String msg = "Could not find a TypeConverter for converting a String to an object of type \"" +
                (type != null ? type.getName() : null) + "\"";
            TypeConverterNotFoundException tcn = new TypeConverterNotFoundException(msg);

            if(type == null)
                msg = Bundle.getErrorString("TypeUtils_nullType");
            else
                msg = Bundle.getErrorString("TypeUtils_noConverterForType", new Object[]{type.getName()});
            tcn.setLocalizedMessage(msg);
            LOGGER.error(msg);

            throw tcn;
        }

        return converter;
    }
473084
public static Object defaultValue(final Class<?> type) {
	final Object value = WRAPPER_DEFAULTS.get(Objects.requireNonNull(type));
	if (value == null) {
	    throw new IllegalArgumentException("Not primitive wrapper");
	}
	return value;
    }