/protostuff-codegen/src/test/java/com/dyuproject/protostuff/codegen/V22Lite.java
Java | 1986 lines | 1791 code | 136 blank | 59 comment | 206 complexity | aee47ba17e353444317647eac8ca736f MD5 | raw file
Possible License(s): Apache-2.0
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: src/test/resources/TestModel.proto
- package com.dyuproject.protostuff.codegen;
- public final class V22Lite {
- private V22Lite() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
- public static final class Foo extends
- com.google.protobuf.GeneratedMessageLite {
- // Use Foo.newBuilder() to construct.
- private Foo() {
- initFields();
- }
- private Foo(boolean noInit) {}
-
- private static final Foo defaultInstance;
- public static Foo getDefaultInstance() {
- return defaultInstance;
- }
-
- public Foo getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public enum EnumSample
- implements com.google.protobuf.Internal.EnumLite {
- TYPE0(0, 0),
- TYPE1(1, 1),
- TYPE2(2, 2),
- TYPE3(3, 3),
- TYPE4(4, 4),
- ;
-
-
- public final int getNumber() { return value; }
-
- public static EnumSample valueOf(int value) {
- switch (value) {
- case 0: return TYPE0;
- case 1: return TYPE1;
- case 2: return TYPE2;
- case 3: return TYPE3;
- case 4: return TYPE4;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap<EnumSample>
- internalGetValueMap() {
- return internalValueMap;
- }
- private static com.google.protobuf.Internal.EnumLiteMap<EnumSample>
- internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap<EnumSample>() {
- public EnumSample findValueByNumber(int number) {
- return EnumSample.valueOf(number)
- ; }
- };
-
- private final int index;
- private final int value;
- private EnumSample(int index, int value) {
- this.index = index;
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:codegen.Foo.EnumSample)
- }
-
- // repeated int32 some_int = 1;
- public static final int SOME_INT_FIELD_NUMBER = 1;
- private java.util.List<java.lang.Integer> someInt_ =
- java.util.Collections.emptyList();
- public java.util.List<java.lang.Integer> getSomeIntList() {
- return someInt_;
- }
- public int getSomeIntCount() { return someInt_.size(); }
- public int getSomeInt(int index) {
- return someInt_.get(index);
- }
-
- // repeated string some_string = 2;
- public static final int SOME_STRING_FIELD_NUMBER = 2;
- private java.util.List<java.lang.String> someString_ =
- java.util.Collections.emptyList();
- public java.util.List<java.lang.String> getSomeStringList() {
- return someString_;
- }
- public int getSomeStringCount() { return someString_.size(); }
- public java.lang.String getSomeString(int index) {
- return someString_.get(index);
- }
-
- // repeated .codegen.Bar bar = 3;
- public static final int BAR_FIELD_NUMBER = 3;
- private java.util.List<com.dyuproject.protostuff.codegen.V22Lite.Bar> bar_ =
- java.util.Collections.emptyList();
- public java.util.List<com.dyuproject.protostuff.codegen.V22Lite.Bar> getBarList() {
- return bar_;
- }
- public int getBarCount() { return bar_.size(); }
- public com.dyuproject.protostuff.codegen.V22Lite.Bar getBar(int index) {
- return bar_.get(index);
- }
-
- // repeated .codegen.Foo.EnumSample some_enum = 4;
- public static final int SOME_ENUM_FIELD_NUMBER = 4;
- private java.util.List<com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample> someEnum_ =
- java.util.Collections.emptyList();
- public java.util.List<com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample> getSomeEnumList() {
- return someEnum_;
- }
- public int getSomeEnumCount() { return someEnum_.size(); }
- public com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample getSomeEnum(int index) {
- return someEnum_.get(index);
- }
-
- // repeated bytes some_bytes = 5;
- public static final int SOME_BYTES_FIELD_NUMBER = 5;
- private java.util.List<com.google.protobuf.ByteString> someBytes_ =
- java.util.Collections.emptyList();
- public java.util.List<com.google.protobuf.ByteString> getSomeBytesList() {
- return someBytes_;
- }
- public int getSomeBytesCount() { return someBytes_.size(); }
- public com.google.protobuf.ByteString getSomeBytes(int index) {
- return someBytes_.get(index);
- }
-
- // repeated bool some_boolean = 6;
- public static final int SOME_BOOLEAN_FIELD_NUMBER = 6;
- private java.util.List<java.lang.Boolean> someBoolean_ =
- java.util.Collections.emptyList();
- public java.util.List<java.lang.Boolean> getSomeBooleanList() {
- return someBoolean_;
- }
- public int getSomeBooleanCount() { return someBoolean_.size(); }
- public boolean getSomeBoolean(int index) {
- return someBoolean_.get(index);
- }
-
- // repeated float some_float = 7;
- public static final int SOME_FLOAT_FIELD_NUMBER = 7;
- private java.util.List<java.lang.Float> someFloat_ =
- java.util.Collections.emptyList();
- public java.util.List<java.lang.Float> getSomeFloatList() {
- return someFloat_;
- }
- public int getSomeFloatCount() { return someFloat_.size(); }
- public float getSomeFloat(int index) {
- return someFloat_.get(index);
- }
-
- // repeated double some_double = 8;
- public static final int SOME_DOUBLE_FIELD_NUMBER = 8;
- private java.util.List<java.lang.Double> someDouble_ =
- java.util.Collections.emptyList();
- public java.util.List<java.lang.Double> getSomeDoubleList() {
- return someDouble_;
- }
- public int getSomeDoubleCount() { return someDouble_.size(); }
- public double getSomeDouble(int index) {
- return someDouble_.get(index);
- }
-
- // repeated int64 some_long = 9;
- public static final int SOME_LONG_FIELD_NUMBER = 9;
- private java.util.List<java.lang.Long> someLong_ =
- java.util.Collections.emptyList();
- public java.util.List<java.lang.Long> getSomeLongList() {
- return someLong_;
- }
- public int getSomeLongCount() { return someLong_.size(); }
- public long getSomeLong(int index) {
- return someLong_.get(index);
- }
-
- private void initFields() {
- }
- public final boolean isInitialized() {
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- for (int element : getSomeIntList()) {
- output.writeInt32(1, element);
- }
- for (java.lang.String element : getSomeStringList()) {
- output.writeString(2, element);
- }
- for (com.dyuproject.protostuff.codegen.V22Lite.Bar element : getBarList()) {
- output.writeMessage(3, element);
- }
- for (com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample element : getSomeEnumList()) {
- output.writeEnum(4, element.getNumber());
- }
- for (com.google.protobuf.ByteString element : getSomeBytesList()) {
- output.writeBytes(5, element);
- }
- for (boolean element : getSomeBooleanList()) {
- output.writeBool(6, element);
- }
- for (float element : getSomeFloatList()) {
- output.writeFloat(7, element);
- }
- for (double element : getSomeDoubleList()) {
- output.writeDouble(8, element);
- }
- for (long element : getSomeLongList()) {
- output.writeInt64(9, element);
- }
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- {
- int dataSize = 0;
- for (int element : getSomeIntList()) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(element);
- }
- size += dataSize;
- size += 1 * getSomeIntList().size();
- }
- {
- int dataSize = 0;
- for (java.lang.String element : getSomeStringList()) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeStringSizeNoTag(element);
- }
- size += dataSize;
- size += 1 * getSomeStringList().size();
- }
- for (com.dyuproject.protostuff.codegen.V22Lite.Bar element : getBarList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, element);
- }
- {
- int dataSize = 0;
- for (com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample element : getSomeEnumList()) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeEnumSizeNoTag(element.getNumber());
- }
- size += dataSize;
- size += 1 * getSomeEnumList().size();
- }
- {
- int dataSize = 0;
- for (com.google.protobuf.ByteString element : getSomeBytesList()) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeBytesSizeNoTag(element);
- }
- size += dataSize;
- size += 1 * getSomeBytesList().size();
- }
- {
- int dataSize = 0;
- dataSize = 1 * getSomeBooleanList().size();
- size += dataSize;
- size += 1 * getSomeBooleanList().size();
- }
- {
- int dataSize = 0;
- dataSize = 4 * getSomeFloatList().size();
- size += dataSize;
- size += 1 * getSomeFloatList().size();
- }
- {
- int dataSize = 0;
- dataSize = 8 * getSomeDoubleList().size();
- size += dataSize;
- size += 1 * getSomeDoubleList().size();
- }
- {
- int dataSize = 0;
- for (long element : getSomeLongList()) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeInt64SizeNoTag(element);
- }
- size += dataSize;
- size += 1 * getSomeLongList().size();
- }
- memoizedSerializedSize = size;
- return size;
- }
-
- public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(com.dyuproject.protostuff.codegen.V22Lite.Foo prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageLite.Builder<
- com.dyuproject.protostuff.codegen.V22Lite.Foo, Builder> {
- private com.dyuproject.protostuff.codegen.V22Lite.Foo result;
-
- // Construct using com.dyuproject.protostuff.codegen.V22Lite.Foo.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new com.dyuproject.protostuff.codegen.V22Lite.Foo();
- return builder;
- }
-
- protected com.dyuproject.protostuff.codegen.V22Lite.Foo internalGetResult() {
- return result;
- }
-
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new com.dyuproject.protostuff.codegen.V22Lite.Foo();
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- public com.dyuproject.protostuff.codegen.V22Lite.Foo getDefaultInstanceForType() {
- return com.dyuproject.protostuff.codegen.V22Lite.Foo.getDefaultInstance();
- }
-
- public boolean isInitialized() {
- return result.isInitialized();
- }
- public com.dyuproject.protostuff.codegen.V22Lite.Foo build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private com.dyuproject.protostuff.codegen.V22Lite.Foo buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- public com.dyuproject.protostuff.codegen.V22Lite.Foo buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- if (result.someInt_ != java.util.Collections.EMPTY_LIST) {
- result.someInt_ =
- java.util.Collections.unmodifiableList(result.someInt_);
- }
- if (result.someString_ != java.util.Collections.EMPTY_LIST) {
- result.someString_ =
- java.util.Collections.unmodifiableList(result.someString_);
- }
- if (result.bar_ != java.util.Collections.EMPTY_LIST) {
- result.bar_ =
- java.util.Collections.unmodifiableList(result.bar_);
- }
- if (result.someEnum_ != java.util.Collections.EMPTY_LIST) {
- result.someEnum_ =
- java.util.Collections.unmodifiableList(result.someEnum_);
- }
- if (result.someBytes_ != java.util.Collections.EMPTY_LIST) {
- result.someBytes_ =
- java.util.Collections.unmodifiableList(result.someBytes_);
- }
- if (result.someBoolean_ != java.util.Collections.EMPTY_LIST) {
- result.someBoolean_ =
- java.util.Collections.unmodifiableList(result.someBoolean_);
- }
- if (result.someFloat_ != java.util.Collections.EMPTY_LIST) {
- result.someFloat_ =
- java.util.Collections.unmodifiableList(result.someFloat_);
- }
- if (result.someDouble_ != java.util.Collections.EMPTY_LIST) {
- result.someDouble_ =
- java.util.Collections.unmodifiableList(result.someDouble_);
- }
- if (result.someLong_ != java.util.Collections.EMPTY_LIST) {
- result.someLong_ =
- java.util.Collections.unmodifiableList(result.someLong_);
- }
- com.dyuproject.protostuff.codegen.V22Lite.Foo returnMe = result;
- result = null;
- return returnMe;
- }
-
- public Builder mergeFrom(com.dyuproject.protostuff.codegen.V22Lite.Foo other) {
- if (other == com.dyuproject.protostuff.codegen.V22Lite.Foo.getDefaultInstance()) return this;
- if (!other.someInt_.isEmpty()) {
- if (result.someInt_.isEmpty()) {
- result.someInt_ = new java.util.ArrayList<java.lang.Integer>();
- }
- result.someInt_.addAll(other.someInt_);
- }
- if (!other.someString_.isEmpty()) {
- if (result.someString_.isEmpty()) {
- result.someString_ = new java.util.ArrayList<java.lang.String>();
- }
- result.someString_.addAll(other.someString_);
- }
- if (!other.bar_.isEmpty()) {
- if (result.bar_.isEmpty()) {
- result.bar_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Lite.Bar>();
- }
- result.bar_.addAll(other.bar_);
- }
- if (!other.someEnum_.isEmpty()) {
- if (result.someEnum_.isEmpty()) {
- result.someEnum_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample>();
- }
- result.someEnum_.addAll(other.someEnum_);
- }
- if (!other.someBytes_.isEmpty()) {
- if (result.someBytes_.isEmpty()) {
- result.someBytes_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
- }
- result.someBytes_.addAll(other.someBytes_);
- }
- if (!other.someBoolean_.isEmpty()) {
- if (result.someBoolean_.isEmpty()) {
- result.someBoolean_ = new java.util.ArrayList<java.lang.Boolean>();
- }
- result.someBoolean_.addAll(other.someBoolean_);
- }
- if (!other.someFloat_.isEmpty()) {
- if (result.someFloat_.isEmpty()) {
- result.someFloat_ = new java.util.ArrayList<java.lang.Float>();
- }
- result.someFloat_.addAll(other.someFloat_);
- }
- if (!other.someDouble_.isEmpty()) {
- if (result.someDouble_.isEmpty()) {
- result.someDouble_ = new java.util.ArrayList<java.lang.Double>();
- }
- result.someDouble_.addAll(other.someDouble_);
- }
- if (!other.someLong_.isEmpty()) {
- if (result.someLong_.isEmpty()) {
- result.someLong_ = new java.util.ArrayList<java.lang.Long>();
- }
- result.someLong_.addAll(other.someLong_);
- }
- return this;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- return this;
- default: {
- if (!parseUnknownField(input, extensionRegistry, tag)) {
- return this;
- }
- break;
- }
- case 8: {
- addSomeInt(input.readInt32());
- break;
- }
- case 10: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- while (input.getBytesUntilLimit() > 0) {
- addSomeInt(input.readInt32());
- }
- input.popLimit(limit);
- break;
- }
- case 18: {
- addSomeString(input.readString());
- break;
- }
- case 26: {
- com.dyuproject.protostuff.codegen.V22Lite.Bar.Builder subBuilder = com.dyuproject.protostuff.codegen.V22Lite.Bar.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addBar(subBuilder.buildPartial());
- break;
- }
- case 32: {
- int rawValue = input.readEnum();
- com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample value = com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample.valueOf(rawValue);
- if (value != null) {
- addSomeEnum(value);
- }
- break;
- }
- case 34: {
- int length = input.readRawVarint32();
- int oldLimit = input.pushLimit(length);
- while(input.getBytesUntilLimit() > 0) {
- int rawValue = input.readEnum();
- com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample value = com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample.valueOf(rawValue);
- if (value != null) {
- addSomeEnum(value);
- }
- }
- input.popLimit(oldLimit);
- break;
- }
- case 42: {
- addSomeBytes(input.readBytes());
- break;
- }
- case 48: {
- addSomeBoolean(input.readBool());
- break;
- }
- case 50: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- while (input.getBytesUntilLimit() > 0) {
- addSomeBoolean(input.readBool());
- }
- input.popLimit(limit);
- break;
- }
- case 61: {
- addSomeFloat(input.readFloat());
- break;
- }
- case 58: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- while (input.getBytesUntilLimit() > 0) {
- addSomeFloat(input.readFloat());
- }
- input.popLimit(limit);
- break;
- }
- case 65: {
- addSomeDouble(input.readDouble());
- break;
- }
- case 66: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- while (input.getBytesUntilLimit() > 0) {
- addSomeDouble(input.readDouble());
- }
- input.popLimit(limit);
- break;
- }
- case 72: {
- addSomeLong(input.readInt64());
- break;
- }
- case 74: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- while (input.getBytesUntilLimit() > 0) {
- addSomeLong(input.readInt64());
- }
- input.popLimit(limit);
- break;
- }
- }
- }
- }
-
-
- // repeated int32 some_int = 1;
- public java.util.List<java.lang.Integer> getSomeIntList() {
- return java.util.Collections.unmodifiableList(result.someInt_);
- }
- public int getSomeIntCount() {
- return result.getSomeIntCount();
- }
- public int getSomeInt(int index) {
- return result.getSomeInt(index);
- }
- public Builder setSomeInt(int index, int value) {
- result.someInt_.set(index, value);
- return this;
- }
- public Builder addSomeInt(int value) {
- if (result.someInt_.isEmpty()) {
- result.someInt_ = new java.util.ArrayList<java.lang.Integer>();
- }
- result.someInt_.add(value);
- return this;
- }
- public Builder addAllSomeInt(
- java.lang.Iterable<? extends java.lang.Integer> values) {
- if (result.someInt_.isEmpty()) {
- result.someInt_ = new java.util.ArrayList<java.lang.Integer>();
- }
- super.addAll(values, result.someInt_);
- return this;
- }
- public Builder clearSomeInt() {
- result.someInt_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated string some_string = 2;
- public java.util.List<java.lang.String> getSomeStringList() {
- return java.util.Collections.unmodifiableList(result.someString_);
- }
- public int getSomeStringCount() {
- return result.getSomeStringCount();
- }
- public java.lang.String getSomeString(int index) {
- return result.getSomeString(index);
- }
- public Builder setSomeString(int index, java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.someString_.set(index, value);
- return this;
- }
- public Builder addSomeString(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.someString_.isEmpty()) {
- result.someString_ = new java.util.ArrayList<java.lang.String>();
- }
- result.someString_.add(value);
- return this;
- }
- public Builder addAllSomeString(
- java.lang.Iterable<? extends java.lang.String> values) {
- if (result.someString_.isEmpty()) {
- result.someString_ = new java.util.ArrayList<java.lang.String>();
- }
- super.addAll(values, result.someString_);
- return this;
- }
- public Builder clearSomeString() {
- result.someString_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated .codegen.Bar bar = 3;
- public java.util.List<com.dyuproject.protostuff.codegen.V22Lite.Bar> getBarList() {
- return java.util.Collections.unmodifiableList(result.bar_);
- }
- public int getBarCount() {
- return result.getBarCount();
- }
- public com.dyuproject.protostuff.codegen.V22Lite.Bar getBar(int index) {
- return result.getBar(index);
- }
- public Builder setBar(int index, com.dyuproject.protostuff.codegen.V22Lite.Bar value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.bar_.set(index, value);
- return this;
- }
- public Builder setBar(int index, com.dyuproject.protostuff.codegen.V22Lite.Bar.Builder builderForValue) {
- result.bar_.set(index, builderForValue.build());
- return this;
- }
- public Builder addBar(com.dyuproject.protostuff.codegen.V22Lite.Bar value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.bar_.isEmpty()) {
- result.bar_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Lite.Bar>();
- }
- result.bar_.add(value);
- return this;
- }
- public Builder addBar(com.dyuproject.protostuff.codegen.V22Lite.Bar.Builder builderForValue) {
- if (result.bar_.isEmpty()) {
- result.bar_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Lite.Bar>();
- }
- result.bar_.add(builderForValue.build());
- return this;
- }
- public Builder addAllBar(
- java.lang.Iterable<? extends com.dyuproject.protostuff.codegen.V22Lite.Bar> values) {
- if (result.bar_.isEmpty()) {
- result.bar_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Lite.Bar>();
- }
- super.addAll(values, result.bar_);
- return this;
- }
- public Builder clearBar() {
- result.bar_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated .codegen.Foo.EnumSample some_enum = 4;
- public java.util.List<com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample> getSomeEnumList() {
- return java.util.Collections.unmodifiableList(result.someEnum_);
- }
- public int getSomeEnumCount() {
- return result.getSomeEnumCount();
- }
- public com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample getSomeEnum(int index) {
- return result.getSomeEnum(index);
- }
- public Builder setSomeEnum(int index, com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.someEnum_.set(index, value);
- return this;
- }
- public Builder addSomeEnum(com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.someEnum_.isEmpty()) {
- result.someEnum_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample>();
- }
- result.someEnum_.add(value);
- return this;
- }
- public Builder addAllSomeEnum(
- java.lang.Iterable<? extends com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample> values) {
- if (result.someEnum_.isEmpty()) {
- result.someEnum_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample>();
- }
- super.addAll(values, result.someEnum_);
- return this;
- }
- public Builder clearSomeEnum() {
- result.someEnum_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated bytes some_bytes = 5;
- public java.util.List<com.google.protobuf.ByteString> getSomeBytesList() {
- return java.util.Collections.unmodifiableList(result.someBytes_);
- }
- public int getSomeBytesCount() {
- return result.getSomeBytesCount();
- }
- public com.google.protobuf.ByteString getSomeBytes(int index) {
- return result.getSomeBytes(index);
- }
- public Builder setSomeBytes(int index, com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.someBytes_.set(index, value);
- return this;
- }
- public Builder addSomeBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.someBytes_.isEmpty()) {
- result.someBytes_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
- }
- result.someBytes_.add(value);
- return this;
- }
- public Builder addAllSomeBytes(
- java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
- if (result.someBytes_.isEmpty()) {
- result.someBytes_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
- }
- super.addAll(values, result.someBytes_);
- return this;
- }
- public Builder clearSomeBytes() {
- result.someBytes_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated bool some_boolean = 6;
- public java.util.List<java.lang.Boolean> getSomeBooleanList() {
- return java.util.Collections.unmodifiableList(result.someBoolean_);
- }
- public int getSomeBooleanCount() {
- return result.getSomeBooleanCount();
- }
- public boolean getSomeBoolean(int index) {
- return result.getSomeBoolean(index);
- }
- public Builder setSomeBoolean(int index, boolean value) {
- result.someBoolean_.set(index, value);
- return this;
- }
- public Builder addSomeBoolean(boolean value) {
- if (result.someBoolean_.isEmpty()) {
- result.someBoolean_ = new java.util.ArrayList<java.lang.Boolean>();
- }
- result.someBoolean_.add(value);
- return this;
- }
- public Builder addAllSomeBoolean(
- java.lang.Iterable<? extends java.lang.Boolean> values) {
- if (result.someBoolean_.isEmpty()) {
- result.someBoolean_ = new java.util.ArrayList<java.lang.Boolean>();
- }
- super.addAll(values, result.someBoolean_);
- return this;
- }
- public Builder clearSomeBoolean() {
- result.someBoolean_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated float some_float = 7;
- public java.util.List<java.lang.Float> getSomeFloatList() {
- return java.util.Collections.unmodifiableList(result.someFloat_);
- }
- public int getSomeFloatCount() {
- return result.getSomeFloatCount();
- }
- public float getSomeFloat(int index) {
- return result.getSomeFloat(index);
- }
- public Builder setSomeFloat(int index, float value) {
- result.someFloat_.set(index, value);
- return this;
- }
- public Builder addSomeFloat(float value) {
- if (result.someFloat_.isEmpty()) {
- result.someFloat_ = new java.util.ArrayList<java.lang.Float>();
- }
- result.someFloat_.add(value);
- return this;
- }
- public Builder addAllSomeFloat(
- java.lang.Iterable<? extends java.lang.Float> values) {
- if (result.someFloat_.isEmpty()) {
- result.someFloat_ = new java.util.ArrayList<java.lang.Float>();
- }
- super.addAll(values, result.someFloat_);
- return this;
- }
- public Builder clearSomeFloat() {
- result.someFloat_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated double some_double = 8;
- public java.util.List<java.lang.Double> getSomeDoubleList() {
- return java.util.Collections.unmodifiableList(result.someDouble_);
- }
- public int getSomeDoubleCount() {
- return result.getSomeDoubleCount();
- }
- public double getSomeDouble(int index) {
- return result.getSomeDouble(index);
- }
- public Builder setSomeDouble(int index, double value) {
- result.someDouble_.set(index, value);
- return this;
- }
- public Builder addSomeDouble(double value) {
- if (result.someDouble_.isEmpty()) {
- result.someDouble_ = new java.util.ArrayList<java.lang.Double>();
- }
- result.someDouble_.add(value);
- return this;
- }
- public Builder addAllSomeDouble(
- java.lang.Iterable<? extends java.lang.Double> values) {
- if (result.someDouble_.isEmpty()) {
- result.someDouble_ = new java.util.ArrayList<java.lang.Double>();
- }
- super.addAll(values, result.someDouble_);
- return this;
- }
- public Builder clearSomeDouble() {
- result.someDouble_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated int64 some_long = 9;
- public java.util.List<java.lang.Long> getSomeLongList() {
- return java.util.Collections.unmodifiableList(result.someLong_);
- }
- public int getSomeLongCount() {
- return result.getSomeLongCount();
- }
- public long getSomeLong(int index) {
- return result.getSomeLong(index);
- }
- public Builder setSomeLong(int index, long value) {
- result.someLong_.set(index, value);
- return this;
- }
- public Builder addSomeLong(long value) {
- if (result.someLong_.isEmpty()) {
- result.someLong_ = new java.util.ArrayList<java.lang.Long>();
- }
- result.someLong_.add(value);
- return this;
- }
- public Builder addAllSomeLong(
- java.lang.Iterable<? extends java.lang.Long> values) {
- if (result.someLong_.isEmpty()) {
- result.someLong_ = new java.util.ArrayList<java.lang.Long>();
- }
- super.addAll(values, result.someLong_);
- return this;
- }
- public Builder clearSomeLong() {
- result.someLong_ = java.util.Collections.emptyList();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:codegen.Foo)
- }
-
- static {
- defaultInstance = new Foo(true);
- com.dyuproject.protostuff.codegen.V22Lite.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:codegen.Foo)
- }
-
- public static final class Bar extends
- com.google.protobuf.GeneratedMessageLite {
- // Use Bar.newBuilder() to construct.
- private Bar() {
- initFields();
- }
- private Bar(boolean noInit) {}
-
- private static final Bar defaultInstance;
- public static Bar getDefaultInstance() {
- return defaultInstance;
- }
-
- public Bar getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public enum Status
- implements com.google.protobuf.Internal.EnumLite {
- PENDING(0, 0),
- STARTED(1, 1),
- COMPLETED(2, 2),
- ;
-
-
- public final int getNumber() { return value; }
-
- public static Status valueOf(int value) {
- switch (value) {
- case 0: return PENDING;
- case 1: return STARTED;
- case 2: return COMPLETED;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap<Status>
- internalGetValueMap() {
- return internalValueMap;
- }
- private static com.google.protobuf.Internal.EnumLiteMap<Status>
- internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap<Status>() {
- public Status findValueByNumber(int number) {
- return Status.valueOf(number)
- ; }
- };
-
- private final int index;
- private final int value;
- private Status(int index, int value) {
- this.index = index;
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:codegen.Bar.Status)
- }
-
- // optional int32 some_int = 1;
- public static final int SOME_INT_FIELD_NUMBER = 1;
- private boolean hasSomeInt;
- private int someInt_ = 0;
- public boolean hasSomeInt() { return hasSomeInt; }
- public int getSomeInt() { return someInt_; }
-
- // optional string some_string = 2;
- public static final int SOME_STRING_FIELD_NUMBER = 2;
- private boolean hasSomeString;
- private java.lang.String someString_ = "";
- public boolean hasSomeString() { return hasSomeString; }
- public java.lang.String getSomeString() { return someString_; }
-
- // optional .codegen.Baz baz = 3;
- public static final int BAZ_FIELD_NUMBER = 3;
- private boolean hasBaz;
- private com.dyuproject.protostuff.codegen.V22Lite.Baz baz_;
- public boolean hasBaz() { return hasBaz; }
- public com.dyuproject.protostuff.codegen.V22Lite.Baz getBaz() { return baz_; }
-
- // optional .codegen.Bar.Status some_enum = 4;
- public static final int SOME_ENUM_FIELD_NUMBER = 4;
- private boolean hasSomeEnum;
- private com.dyuproject.protostuff.codegen.V22Lite.Bar.Status someEnum_;
- public boolean hasSomeEnum() { return hasSomeEnum; }
- public com.dyuproject.protostuff.codegen.V22Lite.Bar.Status getSomeEnum() { return someEnum_; }
-
- // optional bytes some_bytes = 5;
- public static final int SOME_BYTES_FIELD_NUMBER = 5;
- private boolean hasSomeBytes;
- private com.google.protobuf.ByteString someBytes_ = com.google.protobuf.ByteString.EMPTY;
- public boolean hasSomeBytes() { return hasSomeBytes; }
- public com.google.protobuf.ByteString getSomeBytes() { return someBytes_; }
-
- // optional bool some_boolean = 6;
- public static final int SOME_BOOLEAN_FIELD_NUMBER = 6;
- private boolean hasSomeBoolean;
- private boolean someBoolean_ = false;
- public boolean hasSomeBoolean() { return hasSomeBoolean; }
- public boolean getSomeBoolean() { return someBoolean_; }
-
- // optional float some_float = 7;
- public static final int SOME_FLOAT_FIELD_NUMBER = 7;
- private boolean hasSomeFloat;
- private float someFloat_ = 0F;
- public boolean hasSomeFloat() { return hasSomeFloat; }
- public float getSomeFloat() { return someFloat_; }
-
- // optional double some_double = 8;
- public static final int SOME_DOUBLE_FIELD_NUMBER = 8;
- private boolean hasSomeDouble;
- private double someDouble_ = 0D;
- public boolean hasSomeDouble() { return hasSomeDouble; }
- public double getSomeDouble() { return someDouble_; }
-
- // optional int64 some_long = 9;
- public static final int SOME_LONG_FIELD_NUMBER = 9;
- private boolean hasSomeLong;
- private long someLong_ = 0L;
- public boolean hasSomeLong() { return hasSomeLong; }
- public long getSomeLong() { return someLong_; }
-
- private void initFields() {
- baz_ = com.dyuproject.protostuff.codegen.V22Lite.Baz.getDefaultInstance();
- someEnum_ = com.dyuproject.protostuff.codegen.V22Lite.Bar.Status.PENDING;
- }
- public final boolean isInitialized() {
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (hasSomeInt()) {
- output.writeInt32(1, getSomeInt());
- }
- if (hasSomeString()) {
- output.writeString(2, getSomeString());
- }
- if (hasBaz()) {
- output.writeMessage(3, getBaz());
- }
- if (hasSomeEnum()) {
- output.writeEnum(4, getSomeEnum().getNumber());
- }
- if (hasSomeBytes()) {
- output.writeBytes(5, getSomeBytes());
- }
- if (hasSomeBoolean()) {
- output.writeBool(6, getSomeBoolean());
- }
- if (hasSomeFloat()) {
- output.writeFloat(7, getSomeFloat());
- }
- if (hasSomeDouble()) {
- output.writeDouble(8, getSomeDouble());
- }
- if (hasSomeLong()) {
- output.writeInt64(9, getSomeLong());
- }
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasSomeInt()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(1, getSomeInt());
- }
- if (hasSomeString()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(2, getSomeString());
- }
- if (hasBaz()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, getBaz());
- }
- if (hasSomeEnum()) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(4, getSomeEnum().getNumber());
- }
- if (hasSomeBytes()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(5, getSomeBytes());
- }
- if (hasSomeBoolean()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBoolSize(6, getSomeBoolean());
- }
- if (hasSomeFloat()) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(7, getSomeFloat());
- }
- if (hasSomeDouble()) {
- size += com.google.protobuf.CodedOutputStream
- .computeDoubleSize(8, getSomeDouble());
- }
- if (hasSomeLong()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(9, getSomeLong());
- }
- memoizedSerializedSize = size;
- return size;
- }
-
- public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(com.dyuproject.protostuff.codegen.V22Lite.Bar prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageLite.Builder<
- com.dyuproject.protostuff.codegen.V22Lite.Bar, Builder> {
- private com.dyuproject.protostuff.codegen.V22Lite.Bar result;
-
- // Construct using com.dyuproject.protostuff.codegen.V22Lite.Bar.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new com.dyuproject.protostuff.codegen.V22Lite.Bar();
- return builder;
- }
-
- protected com.dyuproject.protostuff.codegen.V22Lite.Bar internalGetResult() {
- return result;
- }
-
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new com.dyuproject.protostuff.codegen.V22Lite.Bar();
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- public com.dyuproject.protostuff.codegen.V22Lite.Bar getDefaultInstanceForType() {
- return com.dyuproject.protostuff.codegen.V22Lite.Bar.getDefaultInstance();
- }
-
- public boolean isInitialized() {
- return result.isInitialized();
- }
- public com.dyuproject.protostuff.codegen.V22Lite.Bar build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private com.dyuproject.protostuff.codegen.V22Lite.Bar buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- public com.dyuproject.protostuff.codegen.V22Lite.Bar buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- com.dyuproject.protostuff.codegen.V22Lite.Bar returnMe = result;
- result = null;
- return returnMe;
- }
-
- public Builder mergeFrom(com.dyuproject.protostuff.codegen.V22Lite.Bar other) {
- if (other == com.dyuproject.protostuff.codegen.V22Lite.Bar.getDefaultInstance()) return this;
- if (other.hasSomeInt()) {
- setSomeInt(other.getSomeInt());
- }
- if (other.hasSomeString()) {
- setSomeString(other.getSomeString());
- }
- if (other.hasBaz()) {
- mergeBaz(other.getBaz());
- }
- if (other.hasSomeEnum()) {
- setSomeEnum(other.getSomeEnum());
- }
- if (other.hasSomeBytes()) {
- setSomeBytes(other.getSomeBytes());
- }
- if (other.hasSomeBoolean()) {
- setSomeBoolean(other.getSomeBoolean());
- }
- if (other.hasSomeFloat()) {
- setSomeFloat(other.getSomeFloat());
- }
- if (other.hasSomeDouble()) {
- setSomeDouble(other.getSomeDouble());
- }
- if (other.hasSomeLong()) {
- setSomeLong(other.getSomeLong());
- }
- return this;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- return this;
- default: {
- if (!parseUnknownField(input, extensionRegistry, tag)) {
- return this;
- }
- break;
- }
- case 8: {
- setSomeInt(input.readInt32());
- break;
- }
- case 18: {
- setSomeString(input.readString());
- break;
- }
- case 26: {
- com.dyuproject.protostuff.codegen.V22Lite.Baz.Builder subBuilder = com.dyuproject.protostuff.codegen.V22Lite.Baz.newBuilder();
- if (hasBaz()) {
- subBuilder.mergeFrom(getBaz());
- }
- input.readMessage(subBuilder, extensionRegistry);
- setBaz(subBuilder.buildPartial());
- break;
- }
- case 32: {
- int rawValue = input.readEnum();
- com.dyuproject.protostuff.codegen.V22Lite.Bar.Status value = com.dyuproject.protostuff.codegen.V22Lite.Bar.Status.valueOf(rawValue);
- if (value != null) {
- setSomeEnum(value);
- }
- break;
- }
- case 42: {
- setSomeBytes(input.readBytes());
- break;
- }
- case 48: {
- setSomeBoolean(input.readBool());
- break;
- }
- case 61: {
- setSomeFloat(input.readFloat());
- break;
- }
- case 65: {
- setSomeDouble(input.readDouble());
- break;
- }
- case 72: {
- setSomeLong(input.readInt64());
- break;
- }
- }
- }
- }
-
-
- // optional int32 some_int = 1;
- public boolean hasSomeInt() {
- return result.hasSomeInt();
- }
- public int getSomeInt() {
- return result.getSomeInt();
- }
- public Builder setSomeInt(int value) {
- result.hasSomeInt = true;
- result.someInt_ = value;
- return this;
- }
- public Builder clearSomeInt() {
- result.hasSomeInt = false;
- result.someInt_ = 0;
- return this;
- }
-
- // optional string some_string = 2;
- public boolean hasSomeString() {
- return result.hasSomeString();
- }
- public java.lang.String getSomeString() {
- return result.getSomeString();
- }
- public Builder setSomeString(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasSomeString = true;
- result.someString_ = value;
- return this;
- }
- public Builder clearSomeString() {
- result.hasSomeString = false;
- result.someString_ = getDefaultInstance().getSomeString();
- return this;
- }
-
- // optional .codegen.Baz baz = 3;
- public boolean hasBaz() {
- return result.hasBaz();
- }
- public com.dyuproject.protostuff.codegen.V22Lite.Baz getBaz() {
- return result.getBaz();
- }
- public Builder setBaz(com.dyuproject.protostuff.codegen.V22Lite.Baz value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasBaz = true;
- result.baz_ = value;
- return this;
- }
- public Builder setBaz(com.dyuproject.protostuff.codegen.V22Lite.Baz.Builder builderForValue) {
- result.hasBaz = true;
- result.baz_ = builderForValue.build();
- return this;
- }
- public Builder mergeBaz(com.dyuproject.protostuff.codegen.V22Lite.Baz value) {
- if (result.hasBaz() &&
- result.baz_ != com.dyuproject.protostuff.codegen.V22Lite.Baz.getDefaultInstance()) {
- result.baz_ =
- com.dyuproject.protostuff.codegen.V22Lite.Baz.newBuilder(result.baz_).mergeFrom(value).buildPartial();
- } else {
- result.baz_ = value;
- }
- result.hasBaz = true;
- return this;
- }
- public Builder clearBaz() {
- result.hasBaz = false;
- result.baz_ = com.dyuproject.protostuff.codegen.V22Lite.Baz.getDefaultInstance();
- return this;
- }
-
- // optional .codegen.Bar.Status some_enum = 4;
- public boolean hasSomeEnum() {
- return result.hasSomeEnum();
- }
- public com.dyuproject.protostuff.codegen.V22Lite.Bar.Status getSomeEnum() {
- return result.getSomeEnum();
- }
- public Builder setSomeEnum(com.dyuproject.protostuff.codegen.V22Lite.Bar.Status value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasSomeEnum = true;
- result.someEnum_ = value;
- return this;
- }
- public Builder clearSomeEnum() {
- result.hasSomeEnum = false;
- result.someEnum_ = com.dyuproject.protostuff.codegen.V22Lite.Bar.Status.PENDING;
- return this;
- }
-
- // optional bytes some_bytes = 5;
- public boolean hasSomeBytes() {
- return result.hasSomeBytes();
- }
- public com.google.protobuf.ByteString getSomeBytes() {
- return result.getSomeBytes();
- }
- public Builder setSomeBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasSomeBytes = true;
- result.someBytes_ = value;
- return this;
- }
- public Builder clearSomeBytes() {
- result.hasSomeBytes = false;
- result.someBytes_ = getDefaultInstance().getSomeBytes();
- return this;
- }
-
- // optional bool some_boolean = 6;
- public boolean hasSomeBoolean() {
- return result.hasSomeBoolean();
- }
- public boolean getSomeBoolean() {
- return result.getSomeBoolean();
- }
- public Builder setSomeBoolean(boolean value) {
- result.hasSomeBoolean = true;
- result.someBoolean_ = value;
- return this;
- }
- public Builder clearSomeBoolean() {
- result.hasSomeBoolean = false;
- result.someBoolean_ = false;
- return this;
- }
-
- // optional float some_float = 7;
- public boolean hasSomeFloat() {
- return result.hasSomeFloat();
- }
- public float getSomeFloat() {
- return result.getSomeFloat();
- }
- public Builder setSomeFloat(float value) {
- result.hasSomeFloat = true;
- result.someFloat_ = value;
- return this;
- }
- public Builder clearSomeFloat() {
- result.hasSomeFloat = false;
- result.someFloat_ = 0F;
- return this;
- }
-
- // optional double some_double = 8;
- public boolean hasSomeDouble() {
- return result.hasSomeDouble();
- }
- public double getSomeDouble() {
- return result.getSomeDouble();
- }
- public Builder setSomeDouble(double value) {
- result.hasSomeDouble = true;
- result.someDouble_ = value;
- return this;
- }
- public Builder clearSomeDouble() {
- result.hasSomeDouble = false;
- result.someDouble_ = 0D;
- return this;
- }
-
- // optional int64 some_long = 9;
- public boolean hasSomeLong() {
- return result.hasSomeLong();
- }
- public long getSomeLong() {
- return result.getSomeLong();
- }
- public Builder setSomeLong(long value) {
- result.hasSomeLong = true;
- result.someLong_ = value;
- return this;
- }
- public Builder clearSomeLong() {
- result.hasSomeLong = false;
- result.someLong_ = 0L;
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:codegen.Bar)
- }
-
- static {
- defaultInstance = new Bar(true);
- com.dyuproject.protostuff.codegen.V22Lite.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:codegen.Bar)
- }
-
- public static final class Baz extends
- com.google.protobuf.GeneratedMessageLite {
- // Use Baz.newBuilder() to construct.
- private Baz() {
- initFields();
- }
- private Baz(boolean noInit) {}
-
- private static final Baz defaultInstance;
- public static Baz getDefaultInstance() {
- return defaultInstance;
- }
-
- public Baz getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- // optional int64 id = 1;
- public static final int ID_FIELD_NUMBER = 1;
- private boolean hasId;
- private long id_ = 0L;
- public boolean hasId() { return hasId; }
- public long getId() { return id_; }
-
- // optional string name = 2;
- public static final int NAME_FIELD_NUMBER = 2;
- private boolean hasName;
- private java.lang.String name_ = "";
- public boolean hasName() { return hasName; }
- public java.lang.String getName() { return name_; }
-
- // optional int64 timestamp = 3;
- public static final int TIMESTAMP_FIELD_NUMBER = 3;
- private boolean hasTimestamp;
- private long timestamp_ = 0L;
- public boolean hasTimestamp() { return hasTimestamp; }
- public long getTimestamp() { return timestamp_; }
-
- private void initFields() {
- }
- public final boolean isInitialized() {
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (hasId()) {
- output.writeInt64(1, getId());
- }
- if (hasName()) {
- output.writeString(2, getName());
- }
- if (hasTimestamp()) {
- output.writeInt64(3, getTimestamp());
- }
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasId()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(1, getId());
- }
- if (hasName()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(2, getName());
- }
- if (hasTimestamp()) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(3, getTimestamp());
- }
- memoizedSerializedSize = size;
- return size;
- }
-
- public static com.dyuproject.protostuff.codegen.V22Lite.Baz parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Baz parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Baz parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Baz parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Baz parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Baz parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Baz parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Baz parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Baz parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.dyuproject.protostuff.codegen.V22Lite.Baz parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(com.dyuproject.protostuff.codegen.V22Lite.Baz prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageLite.Builder<
- com.dyuproject.protostuff.codegen.V22Lite.Baz, Builder> {
- private com.dyuproject.protostuff.codegen.V22Lite.Baz result;
-
- // Construct using com.dyuproject.protostuff.codegen.V22Lite.Baz.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new com.dyuproject.protostuff.codegen.V22Lite.Baz();
- return builder;
- }
-
- protected com.dyuproject.protostuff.codegen.V22Lite.Baz internalGetResult() {
- return result;
- }
-
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new com.dyuproject.protostuff.codegen.V22Lite.Baz();
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- public com.dyuproject.protostuff.codegen.V22Lite.Baz getDefaultInstanceForType() {
- return com.dyuproject.protostuff.codegen.V22Lite.Baz.getDefaultInstance();
- }
-
- public boolean isInitialized() {
- return result.isInitialized();
- }
- public com.dyuproject.protostuff.codegen.V22Lite.Baz build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private com.dyuproject.protostuff.codegen.V22Lite.Baz buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- public com.dyuproject.protostuff.codegen.V22Lite.Baz buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- com.dyuproject.protostuff.codegen.V22Lite.Baz returnMe = result;
- result = null;
- return returnMe;
- }
-
- public Builder mergeFrom(com.dyuproject.protostuff.codegen.V22Lite.Baz other) {
- if (other == com.dyuproject.protostuff.codegen.V22Lite.Baz.getDefaultInstance()) return this;
- if (other.hasId()) {
- setId(other.getId());
- }
- if (other.hasName()) {
- setName(other.getName());
- }
- if (other.hasTimestamp()) {
- setTimestamp(other.getTimestamp());
- }
- return this;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- return this;
- default: {
- if (!parseUnknownField(input, extensionRegistry, tag)) {
- return this;
- }
- break;
- }
- case 8: {
- setId(input.readInt64());
- break;
- }
- case 18: {
- setName(input.readString());
- break;
- }
- case 24: {
- setTimestamp(input.readInt64());
- break;
- }
- }
- }
- }
-
-
- // optional int64 id = 1;
- public boolean hasId() {
- return result.hasId();
- }
- public long getId() {
- return result.getId();
- }
- public Builder setId(long value) {
- result.hasId = true;
- result.id_ = value;
- return this;
- }
- public Builder clearId() {
- result.hasId = false;
- result.id_ = 0L;
- return this;
- }
-
- // optional string name = 2;
- public boolean hasName() {
- return result.hasName();
- }
- public java.lang.String getName() {
- return result.getName();
- }
- public Builder setName(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasName = true;
- result.name_ = value;
- return this;
- }
- public Builder clearName() {
- result.hasName = false;
- result.name_ = getDefaultInstance().getName();
- return this;
- }
-
- // optional int64 timestamp = 3;
- public boolean hasTimestamp() {
- return result.hasTimestamp();
- }
- public long getTimestamp() {
- return result.getTimestamp();
- }
- public Builder setTimestamp(long value) {
- result.hasTimestamp = true;
- result.timestamp_ = value;
- return this;
- }
- public Builder clearTimestamp() {
- result.hasTimestamp = false;
- result.timestamp_ = 0L;
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:codegen.Baz)
- }
-
- static {
- defaultInstance = new Baz(true);
- com.dyuproject.protostuff.codegen.V22Lite.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:codegen.Baz)
- }
-
-
- static {
- }
-
- public static void internalForceInit() {}
-
- // @@protoc_insertion_point(outer_class_scope)
- }