private Class getWrapperClass(Class cls) {
    if (cls == boolean.class) {
      return Boolean.class;
    }
    else if (cls == int.class) {
      return Integer.class;
    }
    else if (cls == float.class) {
      return Float.class;
    }
    else if (cls == double.class) {
      return Double.class;
    }
    else if (cls == short.class) {
      return Short.class;
    }
    else if (cls == long.class) {
      return Long.class;
    }
    else if (cls == byte.class) {
      return Byte.class;
    }
    else if (cls == char.class) {
      return Character.class;
    }

    return cls;
  }