Resolve the given class if it is a primitive class,
returning the corresponding primitive wrapper type instead.
@param clazz the class to check
@return the original class, or a primitive wrapper for the original primitive type
181433
public static Class<?> resolvePrimitiveIfNecessary(Class<?> clazz) {
		Assert.notNull(clazz, "Class must not be null");
		return (clazz.isPrimitive() && clazz != void.class? primitiveTypeToWrapperMap.get(clazz) : clazz);
	}
680950
public boolean isDeprecated(Class<?> clazz) {

        // check if class is marked as deprecated
        if (clazz.getAnnotation(Deprecated.class) != null) { 
            return true; 
        }
        
        // check if super class is deprecated
        Class<?> superClass = clazz.getSuperclass();
        if (superClass != null) {
            return isDeprecated(superClass);
        }
        
        // check if interfaces are deprecated
        for (Class<?> iface : clazz.getInterfaces()) {
            return isDeprecated(iface);
        }
        
        // not deprecated
        return false;
    }
1135425
public static final Class<?> getPrimitiveClass(Class<?> clazz)
    {
        Class<?> retValue = clazz;
        if (clazz == java.lang.Long.class)
        {
            retValue = Long.TYPE;
        } else if (clazz == java.lang.Integer.class)
        {
            retValue = Integer.TYPE;
        } else if (clazz == java.lang.Boolean.class)
        {
            retValue = Boolean.TYPE;
        } else if (clazz == java.lang.Short.class)
        {
            retValue = Short.TYPE;
        } else if (clazz == java.lang.Byte.class)
        {
            retValue = Byte.TYPE;
        } else if (clazz == java.lang.Character.class)
        {
            retValue = Character.TYPE;
        } else if (clazz == java.lang.Double.class)
        {
            retValue = Double.TYPE;
        } else if (clazz == java.lang.Float.class)
        {
            retValue = Float.TYPE;
        }
        return retValue;
    }
498418
public static Class<?> getPrimitiveType(Class<?> wrapperType) {
        if (Boolean.class.equals(wrapperType)) {
            return Boolean.TYPE;
        } else if (Byte.class.equals(wrapperType)) {
            return Byte.TYPE;
        } else if (Character.class.equals(wrapperType)) {
            return Character.TYPE;
        } else if (Short.class.equals(wrapperType)) {
            return Short.TYPE;
        } else if (Integer.class.equals(wrapperType)) {
            return Integer.TYPE;
        } else if (Long.class.equals(wrapperType)) {
            return Long.TYPE;
        } else if (Float.class.equals(wrapperType)) {
            return Float.TYPE;
        } else if (Double.class.equals(wrapperType)) {
            return Double.TYPE;
        } else {
            return null;
        }
    }
1250282
public static Class<?> wrap(final Class<?> cls) {
        N.checkArgNotNull(cls, "cls");

        final Class<?> wrapped = PRIMITIVE_2_WRAPPER.get(cls);

        return wrapped == null ? cls : wrapped;
    }
1017896
public static <T> Clazz<T> Clazz( Class<T> clazz )
	{
		return impl.Clazz( clazz );
	}
105123
public static Class<?> toNonPrimitiveClass(Class<?> clazz) {
        if (clazz.isPrimitive()) {
            Class<?> primitiveClazz = MethodUtils.getPrimitiveWrapper(clazz);
            // the above method returns
            if (primitiveClazz != null) {
                return primitiveClazz;
            } else {
                return clazz;
            }
        } else {
            return clazz;
        }
    }
17489
public static Class<?> resolveParameterType(MethodParameter methodParam, Class clazz) {
		Type genericType = getTargetType(methodParam);
		Preconditions.checkNotNull(clazz, "Class must not be null");
		Map<TypeVariable, Type> typeVariableMap = getTypeVariableMap(clazz);
		Type rawType = getRawType(genericType, typeVariableMap);
		Class result = (rawType instanceof Class ? (Class) rawType : methodParam.getParameterType());
		methodParam.setParameterType(result);
		methodParam.typeVariableMap = typeVariableMap;
		return result;
	}
763306
@SuppressWarnings({ "unchecked", "rawtypes" })
    protected Class<S> resolveClass(Type type) {

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

        return (Class<S>) ResolvableType.forType(type, new TypeVariableMapVariableResolver(map)).resolve(Object.class);
    }
1219461
@Override
  protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException,
      ClassNotFoundException {
    return Class.forName(desc.getName(), true, loader);
  }
394045
public static String type(Class<? extends ParaObject> clazz) {
		return (clazz == null) ? "" : clazz.getSimpleName().toLowerCase();
	}
1294141
public static Class<?> getClass(ClassLoader classLoader, String className) {
        try {

            final Class<?> clazz;

            if (PRIMITIVE_MAPPING.containsKey(className)) {

                String qualifiedName = "[" + PRIMITIVE_MAPPING.get(className);
                clazz = Class.forName(qualifiedName, true, classLoader).getComponentType();
            } else {
                clazz = Class.forName(determineQualifiedName(className), true, classLoader);
            }
            return clazz;
        } catch (ClassNotFoundException ex) {

            int lastSeparatorIndex = className.lastIndexOf(PACKAGE_SEPARATOR_CHARACTER);

            if (lastSeparatorIndex != -1) {
                return getClass(classLoader, className.substring(0, lastSeparatorIndex) + INNER_CLASS_SEPARATOR_CHAR
                        + className.substring(lastSeparatorIndex + 1));
            }
            throw new IllegalArgumentException("Unable to unmarshall String to Class: " + className);
        }
    }
668261
public static ClassLoader getClassLoader(Class<?> clazz) {
        ClassLoader loader = Thread.currentThread().getContextClassLoader();
        if (loader != null) {
            return loader;
        }
        if (clazz != null) {
            loader = clazz.getClassLoader();
            if (loader != null) {
                return loader;
            }
        }
        return ClassLoader.getSystemClassLoader();
    }
668889
public static List<Class<?>> getAllClasses(Class<?> clazz) {
        List<Class<?>> types = new ArrayList<>();
        while (clazz != null) {
            types.add(clazz);
            clazz = clazz.getSuperclass();
        }
        return types;
    }
1280565
public static boolean isSupportedType(final Class<?> clazz) {
        if (ReflectionUtils.isPropertyType(clazz)) {
            return true;
        }
        if (clazz.isArray() || Map.class.isAssignableFrom(clazz) || Iterable.class.isAssignableFrom(clazz)) {
            Class<?> subType;
            if (clazz.isArray()) {
                subType = clazz.getComponentType();
            } else {
                subType = ReflectionUtils.getParameterizedClass(clazz);
            }

            //get component type, String.class from List<String>
            if (subType != null && subType != Object.class && !ReflectionUtils.isPropertyType(subType)) {
                return false;
            }

            //either no componentType or it is an allowed type
            return true;
        }
        return false;
    }
570861
@SuppressWarnings("rawtypes")
	public static Class getTypeClass(String type) throws ClassNotFoundException{
		Class clazz = null;
		if(type.equals("int")){
			clazz = int.class;
		} else if(type.equals("boolean")){
			clazz = boolean.class;
		} else if(type.equals("float")){
			clazz = float.class;
		} else if(type.equals("double")){
			clazz = double.class;
		} else if(type.equals("short")){
			clazz = short.class;
		} else if(type.equals("char")){
			clazz = char.class;
		} else if(type.equals("long")){
			clazz = long.class;
		} else if(type.equals("byte")){
			clazz = byte.class;
		} else {
			clazz = Class.forName(type);
		}
		return clazz;
	}
929011
public static Class getWrapperType(Class primitiveType) {
        if (primitiveType.isPrimitive()) {
            return PRIMITIVES_TO_WRAPPERS.get(primitiveType);
        }
        return primitiveType;
    }