public static Class getPrimitiveType()

in src/main/java/org/apache/commons/beanutils2/MethodUtils.java [542:572]


    public static Class<?> getPrimitiveType(final Class<?> wrapperType) {
        // does anyone know a better strategy than comparing names?
        if (Boolean.class.equals(wrapperType)) {
            return boolean.class;
        }
        if (Float.class.equals(wrapperType)) {
            return float.class;
        }
        if (Long.class.equals(wrapperType)) {
            return long.class;
        }
        if (Integer.class.equals(wrapperType)) {
            return int.class;
        }
        if (Short.class.equals(wrapperType)) {
            return short.class;
        }
        if (Byte.class.equals(wrapperType)) {
            return byte.class;
        }
        if (Double.class.equals(wrapperType)) {
            return double.class;
        }
        if (Character.class.equals(wrapperType)) {
            return char.class;
        }
        if (LOG.isDebugEnabled()) {
            LOG.debug("Not a known primitive wrapper class: " + wrapperType);
        }
        return null;
    }