コード例 #1
0
 /**
  * <code>optional .dossier.Comment content = 3;</code>
  *
  * <pre>
  * The page content, if any.
  * </pre>
  */
 public Builder setContent(com.github.jsdossier.proto.Comment.Builder builderForValue) {
   if (contentBuilder_ == null) {
     content_ = builderForValue.build();
     onChanged();
   } else {
     contentBuilder_.setMessage(builderForValue.build());
   }
   bitField0_ |= 0x00000004;
   return this;
 }
コード例 #2
0
 private HtmlRenderSpec(
     com.google.protobuf.CodedInputStream input,
     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     throws com.google.protobuf.InvalidProtocolBufferException {
   initFields();
   int mutable_bitField0_ = 0;
   com.google.protobuf.UnknownFieldSet.Builder unknownFields =
       com.google.protobuf.UnknownFieldSet.newBuilder();
   try {
     boolean done = false;
     while (!done) {
       int tag = input.readTag();
       switch (tag) {
         case 0:
           done = true;
           break;
         default:
           {
             if (!parseUnknownField(
                 input, unknownFields,
                 extensionRegistry, tag)) {
               done = true;
             }
             break;
           }
         case 10:
           {
             com.github.jsdossier.proto.Resources.Builder subBuilder = null;
             if (((bitField0_ & 0x00000001) == 0x00000001)) {
               subBuilder = resources_.toBuilder();
             }
             resources_ =
                 input.readMessage(com.github.jsdossier.proto.Resources.PARSER, extensionRegistry);
             if (subBuilder != null) {
               subBuilder.mergeFrom(resources_);
               resources_ = subBuilder.buildPartial();
             }
             bitField0_ |= 0x00000001;
             break;
           }
         case 18:
           {
             com.google.protobuf.ByteString bs = input.readBytes();
             bitField0_ |= 0x00000002;
             title_ = bs;
             break;
           }
         case 26:
           {
             com.github.jsdossier.proto.Comment.Builder subBuilder = null;
             if (((bitField0_ & 0x00000004) == 0x00000004)) {
               subBuilder = content_.toBuilder();
             }
             content_ =
                 input.readMessage(com.github.jsdossier.proto.Comment.PARSER, extensionRegistry);
             if (subBuilder != null) {
               subBuilder.mergeFrom(content_);
               content_ = subBuilder.buildPartial();
             }
             bitField0_ |= 0x00000004;
             break;
           }
         case 34:
           {
             com.github.jsdossier.proto.Index.Builder subBuilder = null;
             if (((bitField0_ & 0x00000008) == 0x00000008)) {
               subBuilder = index_.toBuilder();
             }
             index_ =
                 input.readMessage(com.github.jsdossier.proto.Index.PARSER, extensionRegistry);
             if (subBuilder != null) {
               subBuilder.mergeFrom(index_);
               index_ = subBuilder.buildPartial();
             }
             bitField0_ |= 0x00000008;
             break;
           }
       }
     }
   } catch (com.google.protobuf.InvalidProtocolBufferException e) {
     throw e.setUnfinishedMessage(this);
   } catch (java.io.IOException e) {
     throw new com.google.protobuf.InvalidProtocolBufferException(e.getMessage())
         .setUnfinishedMessage(this);
   } finally {
     this.unknownFields = unknownFields.build();
     makeExtensionsImmutable();
   }
 }