Exemplo n.º 1
0
 private JsTypeRenderSpec(
     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:
           {
             if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
               type_ = new java.util.ArrayList<com.github.jsdossier.proto.JsType>();
               mutable_bitField0_ |= 0x00000001;
             }
             type_.add(
                 input.readMessage(com.github.jsdossier.proto.JsType.PARSER, extensionRegistry));
             break;
           }
         case 18:
           {
             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 26:
           {
             com.github.jsdossier.proto.Index.Builder subBuilder = null;
             if (((bitField0_ & 0x00000002) == 0x00000002)) {
               subBuilder = index_.toBuilder();
             }
             index_ =
                 input.readMessage(com.github.jsdossier.proto.Index.PARSER, extensionRegistry);
             if (subBuilder != null) {
               subBuilder.mergeFrom(index_);
               index_ = subBuilder.buildPartial();
             }
             bitField0_ |= 0x00000002;
             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 {
     if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
       type_ = java.util.Collections.unmodifiableList(type_);
     }
     this.unknownFields = unknownFields.build();
     makeExtensionsImmutable();
   }
 }
Exemplo n.º 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();
   }
 }