public static Class<?> lookupType(Type type) {
		try {
			if (type == null) return null;
			String baseType = type.getClassName().replaceAll("\\[\\]", "");
			//Class<?> cls = Filament.filament.classLoader.loadClass(baseType);
			Class<?> cls = null;
			try {
				cls = Thread.currentThread().getContextClassLoader().loadClass(baseType);
			} catch (ClassNotFoundException e) {}
			if (cls == null) cls = Filament.filament.classLoader.getPrimitiveType(baseType);
			int dimensions = 0;
			try {
				if (type.getClassName().contains("[]")) dimensions = type.getDimensions();
			} catch (Exception e) {}
			if (dimensions > 0) cls = Array.newInstance(cls, new int[dimensions]).getClass();
			return cls;
		} catch (Throwable e) {
			e.printStackTrace();
			return null;
		}
	}