Exemplo n.º 1
0
 public Builder mergeFrom(
     com.google.protobuf.CodedInputStream input,
     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     throws java.io.IOException {
   com.google.protobuf.UnknownFieldSet.Builder unknownFields =
       com.google.protobuf.UnknownFieldSet.newBuilder(this.getUnknownFields());
   while (true) {
     int tag = input.readTag();
     switch (tag) {
       case 0:
         this.setUnknownFields(unknownFields.build());
         return this;
       default:
         {
           if (!parseUnknownField(
               input, unknownFields,
               extensionRegistry, tag)) {
             this.setUnknownFields(unknownFields.build());
             return this;
           }
           break;
         }
       case 10:
         {
           jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Header.Builder subBuilder =
               jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Header.newBuilder();
           input.readMessage(subBuilder, extensionRegistry);
           addHeaders(subBuilder.buildPartial());
           break;
         }
       case 18:
         {
           jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Fault.Builder subBuilder =
               jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Fault.newBuilder();
           if (hasFault()) {
             subBuilder.mergeFrom(getFault());
           }
           input.readMessage(subBuilder, extensionRegistry);
           setFault(subBuilder.buildPartial());
           break;
         }
       case 26:
         {
           setResult(input.readString());
           break;
         }
     }
   }
 }
Exemplo n.º 2
0
 public Builder mergeFault(jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Fault value) {
   if (result.hasFault()
       && result.fault_
           != jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Fault
               .getDefaultInstance()) {
     result.fault_ =
         jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Fault.newBuilder(result.fault_)
             .mergeFrom(value)
             .buildPartial();
   } else {
     result.fault_ = value;
   }
   result.hasFault = true;
   return this;
 }