src/main/java/ca/jeb/protobuf/internal/ProtobufSerializerUtils.java
public static final Class<? extends Object> getProtobufClass(Object value, Class<? extends Object> protobufClass)
  {
    if (value instanceof Integer)
    {
      return Integer.TYPE;
    }
    if (value instanceof Boolean)
    {
      return Boolean.TYPE;
    }
    if (value instanceof Double)
    {
      return Double.TYPE;
    }
    if (value instanceof Long || value instanceof Date)
    {
      return Long.TYPE;
    }
    if (value instanceof List)
    {
      return Iterable.class;
    }
    return protobufClass;
  }
public static final Class<? extends Object> getProtobufClass(Object value, Class<? extends Object> protobufClass)
  {
    if (value instanceof Integer)
    {
      return Integer.TYPE;
    }
    if (value instanceof Boolean)
    {
      return Boolean.TYPE;
    }
    if (value instanceof Double)
    {
      return Double.TYPE;
    }
    if (value instanceof Long || value instanceof Date)
    {
      return Long.TYPE;
    }
    if (value instanceof List)
    {
      return Iterable.class;
    }
    return protobufClass;
  }
Retrieve the ProtobufClass based on the POJO value. The returned value may get converted,
as the Protobuf builders/setters use primitives. For example, if user has declared <code>Integer</code>,
this get's converted to <code>int</code>.

@param value - POJO object
@param protobufClass - the Protobuf class
@return Class&lt;? extends Object&gt; - actual Protobuf class to use in setter