예제 #1
0
파일: FooBar.java 프로젝트: pforhan/wire
 @Override
 public boolean equals(Object other) {
   if (other == this) return true;
   if (!(other instanceof Nested)) return false;
   Nested o = (Nested) other;
   return WireInternal.equals(unknownFields(), o.unknownFields())
       && WireInternal.equals(value, o.value);
 }
예제 #2
0
파일: FooBar.java 프로젝트: pforhan/wire
 @Override
 public void encode(ProtoWriter writer, Nested value) throws IOException {
   if (value.value != null) FooBarBazEnum.ADAPTER.encodeWithTag(writer, 1, value.value);
   writer.writeBytes(value.unknownFields());
 }
예제 #3
0
파일: FooBar.java 프로젝트: pforhan/wire
 @Override
 public int encodedSize(Nested value) {
   return (value.value != null ? FooBarBazEnum.ADAPTER.encodedSizeWithTag(1, value.value) : 0)
       + value.unknownFields().size();
 }