PageRenderTime 133ms CodeModel.GetById 31ms RepoModel.GetById 0ms app.codeStats 1ms

/protostuff-codegen/src/test/java/com/dyuproject/protostuff/codegen/V22Lite.java

http://protostuff.googlecode.com/
Java | 1986 lines | 1791 code | 136 blank | 59 comment | 206 complexity | aee47ba17e353444317647eac8ca736f MD5 | raw file
Possible License(s): Apache-2.0

Large files files are truncated, but you can click here to view the full file

  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: src/test/resources/TestModel.proto
  3. package com.dyuproject.protostuff.codegen;
  4. public final class V22Lite {
  5. private V22Lite() {}
  6. public static void registerAllExtensions(
  7. com.google.protobuf.ExtensionRegistryLite registry) {
  8. }
  9. public static final class Foo extends
  10. com.google.protobuf.GeneratedMessageLite {
  11. // Use Foo.newBuilder() to construct.
  12. private Foo() {
  13. initFields();
  14. }
  15. private Foo(boolean noInit) {}
  16. private static final Foo defaultInstance;
  17. public static Foo getDefaultInstance() {
  18. return defaultInstance;
  19. }
  20. public Foo getDefaultInstanceForType() {
  21. return defaultInstance;
  22. }
  23. public enum EnumSample
  24. implements com.google.protobuf.Internal.EnumLite {
  25. TYPE0(0, 0),
  26. TYPE1(1, 1),
  27. TYPE2(2, 2),
  28. TYPE3(3, 3),
  29. TYPE4(4, 4),
  30. ;
  31. public final int getNumber() { return value; }
  32. public static EnumSample valueOf(int value) {
  33. switch (value) {
  34. case 0: return TYPE0;
  35. case 1: return TYPE1;
  36. case 2: return TYPE2;
  37. case 3: return TYPE3;
  38. case 4: return TYPE4;
  39. default: return null;
  40. }
  41. }
  42. public static com.google.protobuf.Internal.EnumLiteMap<EnumSample>
  43. internalGetValueMap() {
  44. return internalValueMap;
  45. }
  46. private static com.google.protobuf.Internal.EnumLiteMap<EnumSample>
  47. internalValueMap =
  48. new com.google.protobuf.Internal.EnumLiteMap<EnumSample>() {
  49. public EnumSample findValueByNumber(int number) {
  50. return EnumSample.valueOf(number)
  51. ; }
  52. };
  53. private final int index;
  54. private final int value;
  55. private EnumSample(int index, int value) {
  56. this.index = index;
  57. this.value = value;
  58. }
  59. // @@protoc_insertion_point(enum_scope:codegen.Foo.EnumSample)
  60. }
  61. // repeated int32 some_int = 1;
  62. public static final int SOME_INT_FIELD_NUMBER = 1;
  63. private java.util.List<java.lang.Integer> someInt_ =
  64. java.util.Collections.emptyList();
  65. public java.util.List<java.lang.Integer> getSomeIntList() {
  66. return someInt_;
  67. }
  68. public int getSomeIntCount() { return someInt_.size(); }
  69. public int getSomeInt(int index) {
  70. return someInt_.get(index);
  71. }
  72. // repeated string some_string = 2;
  73. public static final int SOME_STRING_FIELD_NUMBER = 2;
  74. private java.util.List<java.lang.String> someString_ =
  75. java.util.Collections.emptyList();
  76. public java.util.List<java.lang.String> getSomeStringList() {
  77. return someString_;
  78. }
  79. public int getSomeStringCount() { return someString_.size(); }
  80. public java.lang.String getSomeString(int index) {
  81. return someString_.get(index);
  82. }
  83. // repeated .codegen.Bar bar = 3;
  84. public static final int BAR_FIELD_NUMBER = 3;
  85. private java.util.List<com.dyuproject.protostuff.codegen.V22Lite.Bar> bar_ =
  86. java.util.Collections.emptyList();
  87. public java.util.List<com.dyuproject.protostuff.codegen.V22Lite.Bar> getBarList() {
  88. return bar_;
  89. }
  90. public int getBarCount() { return bar_.size(); }
  91. public com.dyuproject.protostuff.codegen.V22Lite.Bar getBar(int index) {
  92. return bar_.get(index);
  93. }
  94. // repeated .codegen.Foo.EnumSample some_enum = 4;
  95. public static final int SOME_ENUM_FIELD_NUMBER = 4;
  96. private java.util.List<com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample> someEnum_ =
  97. java.util.Collections.emptyList();
  98. public java.util.List<com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample> getSomeEnumList() {
  99. return someEnum_;
  100. }
  101. public int getSomeEnumCount() { return someEnum_.size(); }
  102. public com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample getSomeEnum(int index) {
  103. return someEnum_.get(index);
  104. }
  105. // repeated bytes some_bytes = 5;
  106. public static final int SOME_BYTES_FIELD_NUMBER = 5;
  107. private java.util.List<com.google.protobuf.ByteString> someBytes_ =
  108. java.util.Collections.emptyList();
  109. public java.util.List<com.google.protobuf.ByteString> getSomeBytesList() {
  110. return someBytes_;
  111. }
  112. public int getSomeBytesCount() { return someBytes_.size(); }
  113. public com.google.protobuf.ByteString getSomeBytes(int index) {
  114. return someBytes_.get(index);
  115. }
  116. // repeated bool some_boolean = 6;
  117. public static final int SOME_BOOLEAN_FIELD_NUMBER = 6;
  118. private java.util.List<java.lang.Boolean> someBoolean_ =
  119. java.util.Collections.emptyList();
  120. public java.util.List<java.lang.Boolean> getSomeBooleanList() {
  121. return someBoolean_;
  122. }
  123. public int getSomeBooleanCount() { return someBoolean_.size(); }
  124. public boolean getSomeBoolean(int index) {
  125. return someBoolean_.get(index);
  126. }
  127. // repeated float some_float = 7;
  128. public static final int SOME_FLOAT_FIELD_NUMBER = 7;
  129. private java.util.List<java.lang.Float> someFloat_ =
  130. java.util.Collections.emptyList();
  131. public java.util.List<java.lang.Float> getSomeFloatList() {
  132. return someFloat_;
  133. }
  134. public int getSomeFloatCount() { return someFloat_.size(); }
  135. public float getSomeFloat(int index) {
  136. return someFloat_.get(index);
  137. }
  138. // repeated double some_double = 8;
  139. public static final int SOME_DOUBLE_FIELD_NUMBER = 8;
  140. private java.util.List<java.lang.Double> someDouble_ =
  141. java.util.Collections.emptyList();
  142. public java.util.List<java.lang.Double> getSomeDoubleList() {
  143. return someDouble_;
  144. }
  145. public int getSomeDoubleCount() { return someDouble_.size(); }
  146. public double getSomeDouble(int index) {
  147. return someDouble_.get(index);
  148. }
  149. // repeated int64 some_long = 9;
  150. public static final int SOME_LONG_FIELD_NUMBER = 9;
  151. private java.util.List<java.lang.Long> someLong_ =
  152. java.util.Collections.emptyList();
  153. public java.util.List<java.lang.Long> getSomeLongList() {
  154. return someLong_;
  155. }
  156. public int getSomeLongCount() { return someLong_.size(); }
  157. public long getSomeLong(int index) {
  158. return someLong_.get(index);
  159. }
  160. private void initFields() {
  161. }
  162. public final boolean isInitialized() {
  163. return true;
  164. }
  165. public void writeTo(com.google.protobuf.CodedOutputStream output)
  166. throws java.io.IOException {
  167. getSerializedSize();
  168. for (int element : getSomeIntList()) {
  169. output.writeInt32(1, element);
  170. }
  171. for (java.lang.String element : getSomeStringList()) {
  172. output.writeString(2, element);
  173. }
  174. for (com.dyuproject.protostuff.codegen.V22Lite.Bar element : getBarList()) {
  175. output.writeMessage(3, element);
  176. }
  177. for (com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample element : getSomeEnumList()) {
  178. output.writeEnum(4, element.getNumber());
  179. }
  180. for (com.google.protobuf.ByteString element : getSomeBytesList()) {
  181. output.writeBytes(5, element);
  182. }
  183. for (boolean element : getSomeBooleanList()) {
  184. output.writeBool(6, element);
  185. }
  186. for (float element : getSomeFloatList()) {
  187. output.writeFloat(7, element);
  188. }
  189. for (double element : getSomeDoubleList()) {
  190. output.writeDouble(8, element);
  191. }
  192. for (long element : getSomeLongList()) {
  193. output.writeInt64(9, element);
  194. }
  195. }
  196. private int memoizedSerializedSize = -1;
  197. public int getSerializedSize() {
  198. int size = memoizedSerializedSize;
  199. if (size != -1) return size;
  200. size = 0;
  201. {
  202. int dataSize = 0;
  203. for (int element : getSomeIntList()) {
  204. dataSize += com.google.protobuf.CodedOutputStream
  205. .computeInt32SizeNoTag(element);
  206. }
  207. size += dataSize;
  208. size += 1 * getSomeIntList().size();
  209. }
  210. {
  211. int dataSize = 0;
  212. for (java.lang.String element : getSomeStringList()) {
  213. dataSize += com.google.protobuf.CodedOutputStream
  214. .computeStringSizeNoTag(element);
  215. }
  216. size += dataSize;
  217. size += 1 * getSomeStringList().size();
  218. }
  219. for (com.dyuproject.protostuff.codegen.V22Lite.Bar element : getBarList()) {
  220. size += com.google.protobuf.CodedOutputStream
  221. .computeMessageSize(3, element);
  222. }
  223. {
  224. int dataSize = 0;
  225. for (com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample element : getSomeEnumList()) {
  226. dataSize += com.google.protobuf.CodedOutputStream
  227. .computeEnumSizeNoTag(element.getNumber());
  228. }
  229. size += dataSize;
  230. size += 1 * getSomeEnumList().size();
  231. }
  232. {
  233. int dataSize = 0;
  234. for (com.google.protobuf.ByteString element : getSomeBytesList()) {
  235. dataSize += com.google.protobuf.CodedOutputStream
  236. .computeBytesSizeNoTag(element);
  237. }
  238. size += dataSize;
  239. size += 1 * getSomeBytesList().size();
  240. }
  241. {
  242. int dataSize = 0;
  243. dataSize = 1 * getSomeBooleanList().size();
  244. size += dataSize;
  245. size += 1 * getSomeBooleanList().size();
  246. }
  247. {
  248. int dataSize = 0;
  249. dataSize = 4 * getSomeFloatList().size();
  250. size += dataSize;
  251. size += 1 * getSomeFloatList().size();
  252. }
  253. {
  254. int dataSize = 0;
  255. dataSize = 8 * getSomeDoubleList().size();
  256. size += dataSize;
  257. size += 1 * getSomeDoubleList().size();
  258. }
  259. {
  260. int dataSize = 0;
  261. for (long element : getSomeLongList()) {
  262. dataSize += com.google.protobuf.CodedOutputStream
  263. .computeInt64SizeNoTag(element);
  264. }
  265. size += dataSize;
  266. size += 1 * getSomeLongList().size();
  267. }
  268. memoizedSerializedSize = size;
  269. return size;
  270. }
  271. public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseFrom(
  272. com.google.protobuf.ByteString data)
  273. throws com.google.protobuf.InvalidProtocolBufferException {
  274. return newBuilder().mergeFrom(data).buildParsed();
  275. }
  276. public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseFrom(
  277. com.google.protobuf.ByteString data,
  278. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  279. throws com.google.protobuf.InvalidProtocolBufferException {
  280. return newBuilder().mergeFrom(data, extensionRegistry)
  281. .buildParsed();
  282. }
  283. public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseFrom(byte[] data)
  284. throws com.google.protobuf.InvalidProtocolBufferException {
  285. return newBuilder().mergeFrom(data).buildParsed();
  286. }
  287. public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseFrom(
  288. byte[] data,
  289. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  290. throws com.google.protobuf.InvalidProtocolBufferException {
  291. return newBuilder().mergeFrom(data, extensionRegistry)
  292. .buildParsed();
  293. }
  294. public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseFrom(java.io.InputStream input)
  295. throws java.io.IOException {
  296. return newBuilder().mergeFrom(input).buildParsed();
  297. }
  298. public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseFrom(
  299. java.io.InputStream input,
  300. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  301. throws java.io.IOException {
  302. return newBuilder().mergeFrom(input, extensionRegistry)
  303. .buildParsed();
  304. }
  305. public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseDelimitedFrom(java.io.InputStream input)
  306. throws java.io.IOException {
  307. Builder builder = newBuilder();
  308. if (builder.mergeDelimitedFrom(input)) {
  309. return builder.buildParsed();
  310. } else {
  311. return null;
  312. }
  313. }
  314. public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseDelimitedFrom(
  315. java.io.InputStream input,
  316. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  317. throws java.io.IOException {
  318. Builder builder = newBuilder();
  319. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  320. return builder.buildParsed();
  321. } else {
  322. return null;
  323. }
  324. }
  325. public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseFrom(
  326. com.google.protobuf.CodedInputStream input)
  327. throws java.io.IOException {
  328. return newBuilder().mergeFrom(input).buildParsed();
  329. }
  330. public static com.dyuproject.protostuff.codegen.V22Lite.Foo parseFrom(
  331. com.google.protobuf.CodedInputStream input,
  332. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  333. throws java.io.IOException {
  334. return newBuilder().mergeFrom(input, extensionRegistry)
  335. .buildParsed();
  336. }
  337. public static Builder newBuilder() { return Builder.create(); }
  338. public Builder newBuilderForType() { return newBuilder(); }
  339. public static Builder newBuilder(com.dyuproject.protostuff.codegen.V22Lite.Foo prototype) {
  340. return newBuilder().mergeFrom(prototype);
  341. }
  342. public Builder toBuilder() { return newBuilder(this); }
  343. public static final class Builder extends
  344. com.google.protobuf.GeneratedMessageLite.Builder<
  345. com.dyuproject.protostuff.codegen.V22Lite.Foo, Builder> {
  346. private com.dyuproject.protostuff.codegen.V22Lite.Foo result;
  347. // Construct using com.dyuproject.protostuff.codegen.V22Lite.Foo.newBuilder()
  348. private Builder() {}
  349. private static Builder create() {
  350. Builder builder = new Builder();
  351. builder.result = new com.dyuproject.protostuff.codegen.V22Lite.Foo();
  352. return builder;
  353. }
  354. protected com.dyuproject.protostuff.codegen.V22Lite.Foo internalGetResult() {
  355. return result;
  356. }
  357. public Builder clear() {
  358. if (result == null) {
  359. throw new IllegalStateException(
  360. "Cannot call clear() after build().");
  361. }
  362. result = new com.dyuproject.protostuff.codegen.V22Lite.Foo();
  363. return this;
  364. }
  365. public Builder clone() {
  366. return create().mergeFrom(result);
  367. }
  368. public com.dyuproject.protostuff.codegen.V22Lite.Foo getDefaultInstanceForType() {
  369. return com.dyuproject.protostuff.codegen.V22Lite.Foo.getDefaultInstance();
  370. }
  371. public boolean isInitialized() {
  372. return result.isInitialized();
  373. }
  374. public com.dyuproject.protostuff.codegen.V22Lite.Foo build() {
  375. if (result != null && !isInitialized()) {
  376. throw newUninitializedMessageException(result);
  377. }
  378. return buildPartial();
  379. }
  380. private com.dyuproject.protostuff.codegen.V22Lite.Foo buildParsed()
  381. throws com.google.protobuf.InvalidProtocolBufferException {
  382. if (!isInitialized()) {
  383. throw newUninitializedMessageException(
  384. result).asInvalidProtocolBufferException();
  385. }
  386. return buildPartial();
  387. }
  388. public com.dyuproject.protostuff.codegen.V22Lite.Foo buildPartial() {
  389. if (result == null) {
  390. throw new IllegalStateException(
  391. "build() has already been called on this Builder.");
  392. }
  393. if (result.someInt_ != java.util.Collections.EMPTY_LIST) {
  394. result.someInt_ =
  395. java.util.Collections.unmodifiableList(result.someInt_);
  396. }
  397. if (result.someString_ != java.util.Collections.EMPTY_LIST) {
  398. result.someString_ =
  399. java.util.Collections.unmodifiableList(result.someString_);
  400. }
  401. if (result.bar_ != java.util.Collections.EMPTY_LIST) {
  402. result.bar_ =
  403. java.util.Collections.unmodifiableList(result.bar_);
  404. }
  405. if (result.someEnum_ != java.util.Collections.EMPTY_LIST) {
  406. result.someEnum_ =
  407. java.util.Collections.unmodifiableList(result.someEnum_);
  408. }
  409. if (result.someBytes_ != java.util.Collections.EMPTY_LIST) {
  410. result.someBytes_ =
  411. java.util.Collections.unmodifiableList(result.someBytes_);
  412. }
  413. if (result.someBoolean_ != java.util.Collections.EMPTY_LIST) {
  414. result.someBoolean_ =
  415. java.util.Collections.unmodifiableList(result.someBoolean_);
  416. }
  417. if (result.someFloat_ != java.util.Collections.EMPTY_LIST) {
  418. result.someFloat_ =
  419. java.util.Collections.unmodifiableList(result.someFloat_);
  420. }
  421. if (result.someDouble_ != java.util.Collections.EMPTY_LIST) {
  422. result.someDouble_ =
  423. java.util.Collections.unmodifiableList(result.someDouble_);
  424. }
  425. if (result.someLong_ != java.util.Collections.EMPTY_LIST) {
  426. result.someLong_ =
  427. java.util.Collections.unmodifiableList(result.someLong_);
  428. }
  429. com.dyuproject.protostuff.codegen.V22Lite.Foo returnMe = result;
  430. result = null;
  431. return returnMe;
  432. }
  433. public Builder mergeFrom(com.dyuproject.protostuff.codegen.V22Lite.Foo other) {
  434. if (other == com.dyuproject.protostuff.codegen.V22Lite.Foo.getDefaultInstance()) return this;
  435. if (!other.someInt_.isEmpty()) {
  436. if (result.someInt_.isEmpty()) {
  437. result.someInt_ = new java.util.ArrayList<java.lang.Integer>();
  438. }
  439. result.someInt_.addAll(other.someInt_);
  440. }
  441. if (!other.someString_.isEmpty()) {
  442. if (result.someString_.isEmpty()) {
  443. result.someString_ = new java.util.ArrayList<java.lang.String>();
  444. }
  445. result.someString_.addAll(other.someString_);
  446. }
  447. if (!other.bar_.isEmpty()) {
  448. if (result.bar_.isEmpty()) {
  449. result.bar_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Lite.Bar>();
  450. }
  451. result.bar_.addAll(other.bar_);
  452. }
  453. if (!other.someEnum_.isEmpty()) {
  454. if (result.someEnum_.isEmpty()) {
  455. result.someEnum_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample>();
  456. }
  457. result.someEnum_.addAll(other.someEnum_);
  458. }
  459. if (!other.someBytes_.isEmpty()) {
  460. if (result.someBytes_.isEmpty()) {
  461. result.someBytes_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
  462. }
  463. result.someBytes_.addAll(other.someBytes_);
  464. }
  465. if (!other.someBoolean_.isEmpty()) {
  466. if (result.someBoolean_.isEmpty()) {
  467. result.someBoolean_ = new java.util.ArrayList<java.lang.Boolean>();
  468. }
  469. result.someBoolean_.addAll(other.someBoolean_);
  470. }
  471. if (!other.someFloat_.isEmpty()) {
  472. if (result.someFloat_.isEmpty()) {
  473. result.someFloat_ = new java.util.ArrayList<java.lang.Float>();
  474. }
  475. result.someFloat_.addAll(other.someFloat_);
  476. }
  477. if (!other.someDouble_.isEmpty()) {
  478. if (result.someDouble_.isEmpty()) {
  479. result.someDouble_ = new java.util.ArrayList<java.lang.Double>();
  480. }
  481. result.someDouble_.addAll(other.someDouble_);
  482. }
  483. if (!other.someLong_.isEmpty()) {
  484. if (result.someLong_.isEmpty()) {
  485. result.someLong_ = new java.util.ArrayList<java.lang.Long>();
  486. }
  487. result.someLong_.addAll(other.someLong_);
  488. }
  489. return this;
  490. }
  491. public Builder mergeFrom(
  492. com.google.protobuf.CodedInputStream input,
  493. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  494. throws java.io.IOException {
  495. while (true) {
  496. int tag = input.readTag();
  497. switch (tag) {
  498. case 0:
  499. return this;
  500. default: {
  501. if (!parseUnknownField(input, extensionRegistry, tag)) {
  502. return this;
  503. }
  504. break;
  505. }
  506. case 8: {
  507. addSomeInt(input.readInt32());
  508. break;
  509. }
  510. case 10: {
  511. int length = input.readRawVarint32();
  512. int limit = input.pushLimit(length);
  513. while (input.getBytesUntilLimit() > 0) {
  514. addSomeInt(input.readInt32());
  515. }
  516. input.popLimit(limit);
  517. break;
  518. }
  519. case 18: {
  520. addSomeString(input.readString());
  521. break;
  522. }
  523. case 26: {
  524. com.dyuproject.protostuff.codegen.V22Lite.Bar.Builder subBuilder = com.dyuproject.protostuff.codegen.V22Lite.Bar.newBuilder();
  525. input.readMessage(subBuilder, extensionRegistry);
  526. addBar(subBuilder.buildPartial());
  527. break;
  528. }
  529. case 32: {
  530. int rawValue = input.readEnum();
  531. com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample value = com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample.valueOf(rawValue);
  532. if (value != null) {
  533. addSomeEnum(value);
  534. }
  535. break;
  536. }
  537. case 34: {
  538. int length = input.readRawVarint32();
  539. int oldLimit = input.pushLimit(length);
  540. while(input.getBytesUntilLimit() > 0) {
  541. int rawValue = input.readEnum();
  542. com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample value = com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample.valueOf(rawValue);
  543. if (value != null) {
  544. addSomeEnum(value);
  545. }
  546. }
  547. input.popLimit(oldLimit);
  548. break;
  549. }
  550. case 42: {
  551. addSomeBytes(input.readBytes());
  552. break;
  553. }
  554. case 48: {
  555. addSomeBoolean(input.readBool());
  556. break;
  557. }
  558. case 50: {
  559. int length = input.readRawVarint32();
  560. int limit = input.pushLimit(length);
  561. while (input.getBytesUntilLimit() > 0) {
  562. addSomeBoolean(input.readBool());
  563. }
  564. input.popLimit(limit);
  565. break;
  566. }
  567. case 61: {
  568. addSomeFloat(input.readFloat());
  569. break;
  570. }
  571. case 58: {
  572. int length = input.readRawVarint32();
  573. int limit = input.pushLimit(length);
  574. while (input.getBytesUntilLimit() > 0) {
  575. addSomeFloat(input.readFloat());
  576. }
  577. input.popLimit(limit);
  578. break;
  579. }
  580. case 65: {
  581. addSomeDouble(input.readDouble());
  582. break;
  583. }
  584. case 66: {
  585. int length = input.readRawVarint32();
  586. int limit = input.pushLimit(length);
  587. while (input.getBytesUntilLimit() > 0) {
  588. addSomeDouble(input.readDouble());
  589. }
  590. input.popLimit(limit);
  591. break;
  592. }
  593. case 72: {
  594. addSomeLong(input.readInt64());
  595. break;
  596. }
  597. case 74: {
  598. int length = input.readRawVarint32();
  599. int limit = input.pushLimit(length);
  600. while (input.getBytesUntilLimit() > 0) {
  601. addSomeLong(input.readInt64());
  602. }
  603. input.popLimit(limit);
  604. break;
  605. }
  606. }
  607. }
  608. }
  609. // repeated int32 some_int = 1;
  610. public java.util.List<java.lang.Integer> getSomeIntList() {
  611. return java.util.Collections.unmodifiableList(result.someInt_);
  612. }
  613. public int getSomeIntCount() {
  614. return result.getSomeIntCount();
  615. }
  616. public int getSomeInt(int index) {
  617. return result.getSomeInt(index);
  618. }
  619. public Builder setSomeInt(int index, int value) {
  620. result.someInt_.set(index, value);
  621. return this;
  622. }
  623. public Builder addSomeInt(int value) {
  624. if (result.someInt_.isEmpty()) {
  625. result.someInt_ = new java.util.ArrayList<java.lang.Integer>();
  626. }
  627. result.someInt_.add(value);
  628. return this;
  629. }
  630. public Builder addAllSomeInt(
  631. java.lang.Iterable<? extends java.lang.Integer> values) {
  632. if (result.someInt_.isEmpty()) {
  633. result.someInt_ = new java.util.ArrayList<java.lang.Integer>();
  634. }
  635. super.addAll(values, result.someInt_);
  636. return this;
  637. }
  638. public Builder clearSomeInt() {
  639. result.someInt_ = java.util.Collections.emptyList();
  640. return this;
  641. }
  642. // repeated string some_string = 2;
  643. public java.util.List<java.lang.String> getSomeStringList() {
  644. return java.util.Collections.unmodifiableList(result.someString_);
  645. }
  646. public int getSomeStringCount() {
  647. return result.getSomeStringCount();
  648. }
  649. public java.lang.String getSomeString(int index) {
  650. return result.getSomeString(index);
  651. }
  652. public Builder setSomeString(int index, java.lang.String value) {
  653. if (value == null) {
  654. throw new NullPointerException();
  655. }
  656. result.someString_.set(index, value);
  657. return this;
  658. }
  659. public Builder addSomeString(java.lang.String value) {
  660. if (value == null) {
  661. throw new NullPointerException();
  662. }
  663. if (result.someString_.isEmpty()) {
  664. result.someString_ = new java.util.ArrayList<java.lang.String>();
  665. }
  666. result.someString_.add(value);
  667. return this;
  668. }
  669. public Builder addAllSomeString(
  670. java.lang.Iterable<? extends java.lang.String> values) {
  671. if (result.someString_.isEmpty()) {
  672. result.someString_ = new java.util.ArrayList<java.lang.String>();
  673. }
  674. super.addAll(values, result.someString_);
  675. return this;
  676. }
  677. public Builder clearSomeString() {
  678. result.someString_ = java.util.Collections.emptyList();
  679. return this;
  680. }
  681. // repeated .codegen.Bar bar = 3;
  682. public java.util.List<com.dyuproject.protostuff.codegen.V22Lite.Bar> getBarList() {
  683. return java.util.Collections.unmodifiableList(result.bar_);
  684. }
  685. public int getBarCount() {
  686. return result.getBarCount();
  687. }
  688. public com.dyuproject.protostuff.codegen.V22Lite.Bar getBar(int index) {
  689. return result.getBar(index);
  690. }
  691. public Builder setBar(int index, com.dyuproject.protostuff.codegen.V22Lite.Bar value) {
  692. if (value == null) {
  693. throw new NullPointerException();
  694. }
  695. result.bar_.set(index, value);
  696. return this;
  697. }
  698. public Builder setBar(int index, com.dyuproject.protostuff.codegen.V22Lite.Bar.Builder builderForValue) {
  699. result.bar_.set(index, builderForValue.build());
  700. return this;
  701. }
  702. public Builder addBar(com.dyuproject.protostuff.codegen.V22Lite.Bar value) {
  703. if (value == null) {
  704. throw new NullPointerException();
  705. }
  706. if (result.bar_.isEmpty()) {
  707. result.bar_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Lite.Bar>();
  708. }
  709. result.bar_.add(value);
  710. return this;
  711. }
  712. public Builder addBar(com.dyuproject.protostuff.codegen.V22Lite.Bar.Builder builderForValue) {
  713. if (result.bar_.isEmpty()) {
  714. result.bar_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Lite.Bar>();
  715. }
  716. result.bar_.add(builderForValue.build());
  717. return this;
  718. }
  719. public Builder addAllBar(
  720. java.lang.Iterable<? extends com.dyuproject.protostuff.codegen.V22Lite.Bar> values) {
  721. if (result.bar_.isEmpty()) {
  722. result.bar_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Lite.Bar>();
  723. }
  724. super.addAll(values, result.bar_);
  725. return this;
  726. }
  727. public Builder clearBar() {
  728. result.bar_ = java.util.Collections.emptyList();
  729. return this;
  730. }
  731. // repeated .codegen.Foo.EnumSample some_enum = 4;
  732. public java.util.List<com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample> getSomeEnumList() {
  733. return java.util.Collections.unmodifiableList(result.someEnum_);
  734. }
  735. public int getSomeEnumCount() {
  736. return result.getSomeEnumCount();
  737. }
  738. public com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample getSomeEnum(int index) {
  739. return result.getSomeEnum(index);
  740. }
  741. public Builder setSomeEnum(int index, com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample value) {
  742. if (value == null) {
  743. throw new NullPointerException();
  744. }
  745. result.someEnum_.set(index, value);
  746. return this;
  747. }
  748. public Builder addSomeEnum(com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample value) {
  749. if (value == null) {
  750. throw new NullPointerException();
  751. }
  752. if (result.someEnum_.isEmpty()) {
  753. result.someEnum_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample>();
  754. }
  755. result.someEnum_.add(value);
  756. return this;
  757. }
  758. public Builder addAllSomeEnum(
  759. java.lang.Iterable<? extends com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample> values) {
  760. if (result.someEnum_.isEmpty()) {
  761. result.someEnum_ = new java.util.ArrayList<com.dyuproject.protostuff.codegen.V22Lite.Foo.EnumSample>();
  762. }
  763. super.addAll(values, result.someEnum_);
  764. return this;
  765. }
  766. public Builder clearSomeEnum() {
  767. result.someEnum_ = java.util.Collections.emptyList();
  768. return this;
  769. }
  770. // repeated bytes some_bytes = 5;
  771. public java.util.List<com.google.protobuf.ByteString> getSomeBytesList() {
  772. return java.util.Collections.unmodifiableList(result.someBytes_);
  773. }
  774. public int getSomeBytesCount() {
  775. return result.getSomeBytesCount();
  776. }
  777. public com.google.protobuf.ByteString getSomeBytes(int index) {
  778. return result.getSomeBytes(index);
  779. }
  780. public Builder setSomeBytes(int index, com.google.protobuf.ByteString value) {
  781. if (value == null) {
  782. throw new NullPointerException();
  783. }
  784. result.someBytes_.set(index, value);
  785. return this;
  786. }
  787. public Builder addSomeBytes(com.google.protobuf.ByteString value) {
  788. if (value == null) {
  789. throw new NullPointerException();
  790. }
  791. if (result.someBytes_.isEmpty()) {
  792. result.someBytes_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
  793. }
  794. result.someBytes_.add(value);
  795. return this;
  796. }
  797. public Builder addAllSomeBytes(
  798. java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
  799. if (result.someBytes_.isEmpty()) {
  800. result.someBytes_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
  801. }
  802. super.addAll(values, result.someBytes_);
  803. return this;
  804. }
  805. public Builder clearSomeBytes() {
  806. result.someBytes_ = java.util.Collections.emptyList();
  807. return this;
  808. }
  809. // repeated bool some_boolean = 6;
  810. public java.util.List<java.lang.Boolean> getSomeBooleanList() {
  811. return java.util.Collections.unmodifiableList(result.someBoolean_);
  812. }
  813. public int getSomeBooleanCount() {
  814. return result.getSomeBooleanCount();
  815. }
  816. public boolean getSomeBoolean(int index) {
  817. return result.getSomeBoolean(index);
  818. }
  819. public Builder setSomeBoolean(int index, boolean value) {
  820. result.someBoolean_.set(index, value);
  821. return this;
  822. }
  823. public Builder addSomeBoolean(boolean value) {
  824. if (result.someBoolean_.isEmpty()) {
  825. result.someBoolean_ = new java.util.ArrayList<java.lang.Boolean>();
  826. }
  827. result.someBoolean_.add(value);
  828. return this;
  829. }
  830. public Builder addAllSomeBoolean(
  831. java.lang.Iterable<? extends java.lang.Boolean> values) {
  832. if (result.someBoolean_.isEmpty()) {
  833. result.someBoolean_ = new java.util.ArrayList<java.lang.Boolean>();
  834. }
  835. super.addAll(values, result.someBoolean_);
  836. return this;
  837. }
  838. public Builder clearSomeBoolean() {
  839. result.someBoolean_ = java.util.Collections.emptyList();
  840. return this;
  841. }
  842. // repeated float some_float = 7;
  843. public java.util.List<java.lang.Float> getSomeFloatList() {
  844. return java.util.Collections.unmodifiableList(result.someFloat_);
  845. }
  846. public int getSomeFloatCount() {
  847. return result.getSomeFloatCount();
  848. }
  849. public float getSomeFloat(int index) {
  850. return result.getSomeFloat(index);
  851. }
  852. public Builder setSomeFloat(int index, float value) {
  853. result.someFloat_.set(index, value);
  854. return this;
  855. }
  856. public Builder addSomeFloat(float value) {
  857. if (result.someFloat_.isEmpty()) {
  858. result.someFloat_ = new java.util.ArrayList<java.lang.Float>();
  859. }
  860. result.someFloat_.add(value);
  861. return this;
  862. }
  863. public Builder addAllSomeFloat(
  864. java.lang.Iterable<? extends java.lang.Float> values) {
  865. if (result.someFloat_.isEmpty()) {
  866. result.someFloat_ = new java.util.ArrayList<java.lang.Float>();
  867. }
  868. super.addAll(values, result.someFloat_);
  869. return this;
  870. }
  871. public Builder clearSomeFloat() {
  872. result.someFloat_ = java.util.Collections.emptyList();
  873. return this;
  874. }
  875. // repeated double some_double = 8;
  876. public java.util.List<java.lang.Double> getSomeDoubleList() {
  877. return java.util.Collections.unmodifiableList(result.someDouble_);
  878. }
  879. public int getSomeDoubleCount() {
  880. return result.getSomeDoubleCount();
  881. }
  882. public double getSomeDouble(int index) {
  883. return result.getSomeDouble(index);
  884. }
  885. public Builder setSomeDouble(int index, double value) {
  886. result.someDouble_.set(index, value);
  887. return this;
  888. }
  889. public Builder addSomeDouble(double value) {
  890. if (result.someDouble_.isEmpty()) {
  891. result.someDouble_ = new java.util.ArrayList<java.lang.Double>();
  892. }
  893. result.someDouble_.add(value);
  894. return this;
  895. }
  896. public Builder addAllSomeDouble(
  897. java.lang.Iterable<? extends java.lang.Double> values) {
  898. if (result.someDouble_.isEmpty()) {
  899. result.someDouble_ = new java.util.ArrayList<java.lang.Double>();
  900. }
  901. super.addAll(values, result.someDouble_);
  902. return this;
  903. }
  904. public Builder clearSomeDouble() {
  905. result.someDouble_ = java.util.Collections.emptyList();
  906. return this;
  907. }
  908. // repeated int64 some_long = 9;
  909. public java.util.List<java.lang.Long> getSomeLongList() {
  910. return java.util.Collections.unmodifiableList(result.someLong_);
  911. }
  912. public int getSomeLongCount() {
  913. return result.getSomeLongCount();
  914. }
  915. public long getSomeLong(int index) {
  916. return result.getSomeLong(index);
  917. }
  918. public Builder setSomeLong(int index, long value) {
  919. result.someLong_.set(index, value);
  920. return this;
  921. }
  922. public Builder addSomeLong(long value) {
  923. if (result.someLong_.isEmpty()) {
  924. result.someLong_ = new java.util.ArrayList<java.lang.Long>();
  925. }
  926. result.someLong_.add(value);
  927. return this;
  928. }
  929. public Builder addAllSomeLong(
  930. java.lang.Iterable<? extends java.lang.Long> values) {
  931. if (result.someLong_.isEmpty()) {
  932. result.someLong_ = new java.util.ArrayList<java.lang.Long>();
  933. }
  934. super.addAll(values, result.someLong_);
  935. return this;
  936. }
  937. public Builder clearSomeLong() {
  938. result.someLong_ = java.util.Collections.emptyList();
  939. return this;
  940. }
  941. // @@protoc_insertion_point(builder_scope:codegen.Foo)
  942. }
  943. static {
  944. defaultInstance = new Foo(true);
  945. com.dyuproject.protostuff.codegen.V22Lite.internalForceInit();
  946. defaultInstance.initFields();
  947. }
  948. // @@protoc_insertion_point(class_scope:codegen.Foo)
  949. }
  950. public static final class Bar extends
  951. com.google.protobuf.GeneratedMessageLite {
  952. // Use Bar.newBuilder() to construct.
  953. private Bar() {
  954. initFields();
  955. }
  956. private Bar(boolean noInit) {}
  957. private static final Bar defaultInstance;
  958. public static Bar getDefaultInstance() {
  959. return defaultInstance;
  960. }
  961. public Bar getDefaultInstanceForType() {
  962. return defaultInstance;
  963. }
  964. public enum Status
  965. implements com.google.protobuf.Internal.EnumLite {
  966. PENDING(0, 0),
  967. STARTED(1, 1),
  968. COMPLETED(2, 2),
  969. ;
  970. public final int getNumber() { return value; }
  971. public static Status valueOf(int value) {
  972. switch (value) {
  973. case 0: return PENDING;
  974. case 1: return STARTED;
  975. case 2: return COMPLETED;
  976. default: return null;
  977. }
  978. }
  979. public static com.google.protobuf.Internal.EnumLiteMap<Status>
  980. internalGetValueMap() {
  981. return internalValueMap;
  982. }
  983. private static com.google.protobuf.Internal.EnumLiteMap<Status>
  984. internalValueMap =
  985. new com.google.protobuf.Internal.EnumLiteMap<Status>() {
  986. public Status findValueByNumber(int number) {
  987. return Status.valueOf(number)
  988. ; }
  989. };
  990. private final int index;
  991. private final int value;
  992. private Status(int index, int value) {
  993. this.index = index;
  994. this.value = value;
  995. }
  996. // @@protoc_insertion_point(enum_scope:codegen.Bar.Status)
  997. }
  998. // optional int32 some_int = 1;
  999. public static final int SOME_INT_FIELD_NUMBER = 1;
  1000. private boolean hasSomeInt;
  1001. private int someInt_ = 0;
  1002. public boolean hasSomeInt() { return hasSomeInt; }
  1003. public int getSomeInt() { return someInt_; }
  1004. // optional string some_string = 2;
  1005. public static final int SOME_STRING_FIELD_NUMBER = 2;
  1006. private boolean hasSomeString;
  1007. private java.lang.String someString_ = "";
  1008. public boolean hasSomeString() { return hasSomeString; }
  1009. public java.lang.String getSomeString() { return someString_; }
  1010. // optional .codegen.Baz baz = 3;
  1011. public static final int BAZ_FIELD_NUMBER = 3;
  1012. private boolean hasBaz;
  1013. private com.dyuproject.protostuff.codegen.V22Lite.Baz baz_;
  1014. public boolean hasBaz() { return hasBaz; }
  1015. public com.dyuproject.protostuff.codegen.V22Lite.Baz getBaz() { return baz_; }
  1016. // optional .codegen.Bar.Status some_enum = 4;
  1017. public static final int SOME_ENUM_FIELD_NUMBER = 4;
  1018. private boolean hasSomeEnum;
  1019. private com.dyuproject.protostuff.codegen.V22Lite.Bar.Status someEnum_;
  1020. public boolean hasSomeEnum() { return hasSomeEnum; }
  1021. public com.dyuproject.protostuff.codegen.V22Lite.Bar.Status getSomeEnum() { return someEnum_; }
  1022. // optional bytes some_bytes = 5;
  1023. public static final int SOME_BYTES_FIELD_NUMBER = 5;
  1024. private boolean hasSomeBytes;
  1025. private com.google.protobuf.ByteString someBytes_ = com.google.protobuf.ByteString.EMPTY;
  1026. public boolean hasSomeBytes() { return hasSomeBytes; }
  1027. public com.google.protobuf.ByteString getSomeBytes() { return someBytes_; }
  1028. // optional bool some_boolean = 6;
  1029. public static final int SOME_BOOLEAN_FIELD_NUMBER = 6;
  1030. private boolean hasSomeBoolean;
  1031. private boolean someBoolean_ = false;
  1032. public boolean hasSomeBoolean() { return hasSomeBoolean; }
  1033. public boolean getSomeBoolean() { return someBoolean_; }
  1034. // optional float some_float = 7;
  1035. public static final int SOME_FLOAT_FIELD_NUMBER = 7;
  1036. private boolean hasSomeFloat;
  1037. private float someFloat_ = 0F;
  1038. public boolean hasSomeFloat() { return hasSomeFloat; }
  1039. public float getSomeFloat() { return someFloat_; }
  1040. // optional double some_double = 8;
  1041. public static final int SOME_DOUBLE_FIELD_NUMBER = 8;
  1042. private boolean hasSomeDouble;
  1043. private double someDouble_ = 0D;
  1044. public boolean hasSomeDouble() { return hasSomeDouble; }
  1045. public double getSomeDouble() { return someDouble_; }
  1046. // optional int64 some_long = 9;
  1047. public static final int SOME_LONG_FIELD_NUMBER = 9;
  1048. private boolean hasSomeLong;
  1049. private long someLong_ = 0L;
  1050. public boolean hasSomeLong() { return hasSomeLong; }
  1051. public long getSomeLong() { return someLong_; }
  1052. private void initFields() {
  1053. baz_ = com.dyuproject.protostuff.codegen.V22Lite.Baz.getDefaultInstance();
  1054. someEnum_ = com.dyuproject.protostuff.codegen.V22Lite.Bar.Status.PENDING;
  1055. }
  1056. public final boolean isInitialized() {
  1057. return true;
  1058. }
  1059. public void writeTo(com.google.protobuf.CodedOutputStream output)
  1060. throws java.io.IOException {
  1061. getSerializedSize();
  1062. if (hasSomeInt()) {
  1063. output.writeInt32(1, getSomeInt());
  1064. }
  1065. if (hasSomeString()) {
  1066. output.writeString(2, getSomeString());
  1067. }
  1068. if (hasBaz()) {
  1069. output.writeMessage(3, getBaz());
  1070. }
  1071. if (hasSomeEnum()) {
  1072. output.writeEnum(4, getSomeEnum().getNumber());
  1073. }
  1074. if (hasSomeBytes()) {
  1075. output.writeBytes(5, getSomeBytes());
  1076. }
  1077. if (hasSomeBoolean()) {
  1078. output.writeBool(6, getSomeBoolean());
  1079. }
  1080. if (hasSomeFloat()) {
  1081. output.writeFloat(7, getSomeFloat());
  1082. }
  1083. if (hasSomeDouble()) {
  1084. output.writeDouble(8, getSomeDouble());
  1085. }
  1086. if (hasSomeLong()) {
  1087. output.writeInt64(9, getSomeLong());
  1088. }
  1089. }
  1090. private int memoizedSerializedSize = -1;
  1091. public int getSerializedSize() {
  1092. int size = memoizedSerializedSize;
  1093. if (size != -1) return size;
  1094. size = 0;
  1095. if (hasSomeInt()) {
  1096. size += com.google.protobuf.CodedOutputStream
  1097. .computeInt32Size(1, getSomeInt());
  1098. }
  1099. if (hasSomeString()) {
  1100. size += com.google.protobuf.CodedOutputStream
  1101. .computeStringSize(2, getSomeString());
  1102. }
  1103. if (hasBaz()) {
  1104. size += com.google.protobuf.CodedOutputStream
  1105. .computeMessageSize(3, getBaz());
  1106. }
  1107. if (hasSomeEnum()) {
  1108. size += com.google.protobuf.CodedOutputStream
  1109. .computeEnumSize(4, getSomeEnum().getNumber());
  1110. }
  1111. if (hasSomeBytes()) {
  1112. size += com.google.protobuf.CodedOutputStream
  1113. .computeBytesSize(5, getSomeBytes());
  1114. }
  1115. if (hasSomeBoolean()) {
  1116. size += com.google.protobuf.CodedOutputStream
  1117. .computeBoolSize(6, getSomeBoolean());
  1118. }
  1119. if (hasSomeFloat()) {
  1120. size += com.google.protobuf.CodedOutputStream
  1121. .computeFloatSize(7, getSomeFloat());
  1122. }
  1123. if (hasSomeDouble()) {
  1124. size += com.google.protobuf.CodedOutputStream
  1125. .computeDoubleSize(8, getSomeDouble());
  1126. }
  1127. if (hasSomeLong()) {
  1128. size += com.google.protobuf.CodedOutputStream
  1129. .computeInt64Size(9, getSomeLong());
  1130. }
  1131. memoizedSerializedSize = size;
  1132. return size;
  1133. }
  1134. public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseFrom(
  1135. com.google.protobuf.ByteString data)
  1136. throws com.google.protobuf.InvalidProtocolBufferException {
  1137. return newBuilder().mergeFrom(data).buildParsed();
  1138. }
  1139. public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseFrom(
  1140. com.google.protobuf.ByteString data,
  1141. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1142. throws com.google.protobuf.InvalidProtocolBufferException {
  1143. return newBuilder().mergeFrom(data, extensionRegistry)
  1144. .buildParsed();
  1145. }
  1146. public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseFrom(byte[] data)
  1147. throws com.google.protobuf.InvalidProtocolBufferException {
  1148. return newBuilder().mergeFrom(data).buildParsed();
  1149. }
  1150. public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseFrom(
  1151. byte[] data,
  1152. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1153. throws com.google.protobuf.InvalidProtocolBufferException {
  1154. return newBuilder().mergeFrom(data, extensionRegistry)
  1155. .buildParsed();
  1156. }
  1157. public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseFrom(java.io.InputStream input)
  1158. throws java.io.IOException {
  1159. return newBuilder().mergeFrom(input).buildParsed();
  1160. }
  1161. public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseFrom(
  1162. java.io.InputStream input,
  1163. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1164. throws java.io.IOException {
  1165. return newBuilder().mergeFrom(input, extensionRegistry)
  1166. .buildParsed();
  1167. }
  1168. public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseDelimitedFrom(java.io.InputStream input)
  1169. throws java.io.IOException {
  1170. Builder builder = newBuilder();
  1171. if (builder.mergeDelimitedFrom(input)) {
  1172. return builder.buildParsed();
  1173. } else {
  1174. return null;
  1175. }
  1176. }
  1177. public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseDelimitedFrom(
  1178. java.io.InputStream input,
  1179. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1180. throws java.io.IOException {
  1181. Builder builder = newBuilder();
  1182. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  1183. return builder.buildParsed();
  1184. } else {
  1185. return null;
  1186. }
  1187. }
  1188. public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseFrom(
  1189. com.google.protobuf.CodedInputStream input)
  1190. throws java.io.IOException {
  1191. return newBuilder().mergeFrom(input).buildParsed();
  1192. }
  1193. public static com.dyuproject.protostuff.codegen.V22Lite.Bar parseFrom(
  1194. com.google.protobuf.CodedInputStream input,
  1195. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1196. throws java.io.IOException {
  1197. return newBuilder().mergeFrom(input, extensionRegistry)
  1198. .buildParsed();
  1199. }
  1200. public static Builder newBuilder() { return Builder.create(); }
  1201. public Builder newBuilderForType() { return newBuilder(); }
  1202. public static Builder newBuilder(com.dyuproject.protostuff.codegen.V22Lite.Bar prototype) {
  1203. return newBuilder().mergeFrom(prototype);
  1204. }
  1205. public Builder toBuilder() { return newBuilder(this); }
  1206. public static final class Builder extends
  1207. com.google.protobuf.GeneratedMessageLite.Builder<
  1208. com.dyuproject.protostuff.codegen.V22Lite.Bar, Builder> {
  1209. private com.dyuproject.protostuff.codegen.V22Lite.Bar result;
  1210. // Construct using com.dyuproject.protostuff.codegen.V22Lite.Bar.newBuilder()
  1211. private Builder() {}
  1212. private static Builder create() {
  1213. Builder builder = new Builder();
  1214. builder.result = new com.dyuproject.protostuff.codegen.V22Lite.Bar();
  1215. return builder;
  1216. }
  1217. protected com.dyuproject.protostuff.codegen.V22Lite.Bar internalGetResult() {
  1218. return result;
  1219. }
  1220. public Builder clear() {
  1221. if (result == null) {
  1222. throw new IllegalStateException(
  1223. "Cannot call clear() after build().");
  1224. }
  1225. result = new com.dyuproject.protostuff.codegen.V22Lite.Bar();
  1226. return this;
  1227. }
  1228. public Builder clone() {
  1229. return create().mergeFrom(result);
  1230. }
  1231. public com.dyuproject.protostuff.codegen.V22Lite.Bar getDefaultInstanceForType() {
  1232. return com.dyuproject.protostuff.codegen.V22Lite.Bar.getDefaultInstance();
  1233. }
  1234. public boolean isInitialized() {
  1235. return result.isInitialized();
  1236. }
  1237. public com.dyuproject.protostuff.codegen.V22Lite.Bar build() {
  1238. if (result != null && !isInitialized()) {
  1239. throw newUninitializedMessageException(result);
  1240. }
  1241. return buildPartial();
  1242. }
  1243. private com.dyuproject.protostuff.codegen.V22Lite.Bar buildParsed()
  1244. throws com.google.protobuf.InvalidProtocolBufferException {
  1245. if (!isInitialized()) {
  1246. throw newUninitializedMessageException(
  1247. result).asInvalidProtocolBufferException();
  1248. }
  1249. return buildPartial();
  1250. }
  1251. public com.dyuproject.protostuff.codegen.V22Lite.Bar buildPartial() {
  1252. if (result == null) {
  1253. throw new IllegalStateException(
  1254. "build() has already been called on this Builder.");
  1255. }
  1256. com.dyuproject.protostuff.codegen.V22Lite.Bar returnMe = result;
  1257. result = null;
  1258. return returnMe;
  1259. }
  1260. public Builder mergeFrom(com.dyuproject.protostuff.codegen.V22Lite.Bar other) {
  1261. if (other == com.dyuproject.protostuff.codegen.V22Lite.Bar.getDefaultInstance()) return this;
  1262. if (other.hasSomeInt()) {
  1263. setSomeInt(other.getSomeInt());
  1264. }
  1265. if (other.hasSomeString()) {
  1266. setSomeString(other.getSomeString());
  1267. }
  1268. if (other.hasBaz()) {
  1269. mergeBaz(other.getBaz());
  1270. }
  1271. if (other.hasSomeEnum()) {
  1272. setSomeEnum(other.getSomeEnum());
  1273. }
  1274. if (other.hasSomeBytes()) {
  1275. setSomeBytes(other.getSomeBytes());
  1276. }
  1277. if (other.hasSomeBoolean()) {
  1278. setSomeBoolean(other.getSomeBoolean());
  1279. }
  1280. if (other.hasSomeFloat()) {
  1281. s

Large files files are truncated, but you can click here to view the full file