示例#1
0
文件: C.java 项目: crazybob/wire
 @Override
 public boolean equals(Object other) {
   if (other == this) return true;
   if (!(other instanceof C)) return false;
   C o = (C) other;
   return Internal.equals(unknownFields(), o.unknownFields()) && Internal.equals(i, o.i);
 }
示例#2
0
文件: C.java 项目: crazybob/wire
 @Override
 public void encode(ProtoWriter writer, C value) throws IOException {
   if (value.i != null) ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i);
   writer.writeBytes(value.unknownFields());
 }
示例#3
0
文件: C.java 项目: crazybob/wire
 @Override
 public int encodedSize(C value) {
   return (value.i != null ? ProtoAdapter.INT32.encodedSizeWithTag(1, value.i) : 0)
       + value.unknownFields().size();
 }
示例#4
0
文件: C.java 项目: crazybob/wire
 @Override
 public C redact(C value) {
   Builder builder = value.newBuilder();
   builder.clearUnknownFields();
   return builder.build();
 }