package com.ym.library.rxbus;

public class PrimitiveBox {
    /**
     * 装箱
     *
     * @param target 目标类
     * @return 转换后的Class
     */
    public static Class<?> mantle(final Class<?> target) {
        if (boolean.class.equals(target)) {
            return Boolean.class;
        } else if (char.class.equals(target)) {
            return Character.class;
        } else if (byte.class.equals(target)) {
            return Byte.class;
        } else if (short.class.equals(target)) {
            return Short.class;
        } else if (int.class.equals(target)) {
            return Integer.class;
        } else if (long.class.equals(target)) {
            return Long.class;
        } else if (float.class.equals(target)) {
            return Float.class;
        } else if (double.class.equals(target)) {
            return Double.class;
        } else {
            return target;
        }
    }

}
