code: @Override
    public Class resolveType(Object obj) {
  
      if (obj instanceof Number) {
  
        Number value = (Number) obj;
  
        if (isDecimal(value)) {
          return (isFloat(value) ? Float.class : Double.class);
        }
        else {
          return (isByte(value) ? Byte.class
            : (isShort(value) ? Short.class
            : (isInteger(value) ? Integer.class : Long.class)));
        }
      }
  
      return super.resolveType(obj);
    }
docs: /* (non-Javadoc)