This project has retired. For details please refer to its Attic page.
Source code
001/**
002 * Autogenerated by Avro
003 *
004 * DO NOT EDIT DIRECTLY
005 */
006package org.apache.reef.tang.implementation.avro;
007
008import org.apache.avro.specific.SpecificData;
009
010@SuppressWarnings("all")
011@org.apache.avro.specific.AvroGenerated
012public class AvroNode extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
013  private static final long serialVersionUID = -5256697313674444547L;
014  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"AvroNode\",\"namespace\":\"org.apache.reef.tang.implementation.avro\",\"fields\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"fullName\",\"type\":\"string\"},{\"name\":\"classNode\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"AvroClassNode\",\"fields\":[{\"name\":\"isInjectionCandidate\",\"type\":\"boolean\"},{\"name\":\"isExternalConstructor\",\"type\":\"boolean\"},{\"name\":\"isUnit\",\"type\":\"boolean\"},{\"name\":\"injectableConstructors\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"AvroConstructorDef\",\"fields\":[{\"name\":\"fullClassName\",\"type\":\"string\"},{\"name\":\"constructorArgs\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"AvroConstructorArg\",\"fields\":[{\"name\":\"fullArgClassName\",\"type\":\"string\"},{\"name\":\"namedParameterName\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"isInjectionFuture\",\"type\":\"boolean\"}]}}}]}}},{\"name\":\"otherConstructors\",\"type\":{\"type\":\"array\",\"items\":\"AvroConstructorDef\"}},{\"name\":\"implFullNames\",\"type\":{\"type\":\"array\",\"items\":\"string\"}},{\"name\":\"defaultImplementation\",\"type\":[\"null\",\"string\"],\"default\":null}]}],\"default\":null},{\"name\":\"namedParameterNode\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"AvroNamedParameterNode\",\"fields\":[{\"name\":\"simpleArgClassName\",\"type\":\"string\"},{\"name\":\"fullArgClassName\",\"type\":\"string\"},{\"name\":\"isSet\",\"type\":\"boolean\"},{\"name\":\"isList\",\"type\":\"boolean\"},{\"name\":\"documentation\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"shortName\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"instanceDefault\",\"type\":{\"type\":\"array\",\"items\":\"string\"}}]}],\"default\":null},{\"name\":\"packageNode\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"AvroPackageNode\",\"fields\":[]}],\"default\":null},{\"name\":\"children\",\"type\":{\"type\":\"array\",\"items\":\"AvroNode\"}}]}");
015  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
016  @Deprecated public java.lang.CharSequence name;
017  @Deprecated public java.lang.CharSequence fullName;
018  @Deprecated public org.apache.reef.tang.implementation.avro.AvroClassNode classNode;
019  @Deprecated public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode namedParameterNode;
020  @Deprecated public org.apache.reef.tang.implementation.avro.AvroPackageNode packageNode;
021  @Deprecated public java.util.List<org.apache.reef.tang.implementation.avro.AvroNode> children;
022
023  /**
024   * Default constructor.  Note that this does not initialize fields
025   * to their default values from the schema.  If that is desired then
026   * one should use <code>newBuilder()</code>.
027   */
028  public AvroNode() {}
029
030  /**
031   * All-args constructor.
032   * @param name The new value for name
033   * @param fullName The new value for fullName
034   * @param classNode The new value for classNode
035   * @param namedParameterNode The new value for namedParameterNode
036   * @param packageNode The new value for packageNode
037   * @param children The new value for children
038   */
039  public AvroNode(java.lang.CharSequence name, java.lang.CharSequence fullName, org.apache.reef.tang.implementation.avro.AvroClassNode classNode, org.apache.reef.tang.implementation.avro.AvroNamedParameterNode namedParameterNode, org.apache.reef.tang.implementation.avro.AvroPackageNode packageNode, java.util.List<org.apache.reef.tang.implementation.avro.AvroNode> children) {
040    this.name = name;
041    this.fullName = fullName;
042    this.classNode = classNode;
043    this.namedParameterNode = namedParameterNode;
044    this.packageNode = packageNode;
045    this.children = children;
046  }
047
048  public org.apache.avro.Schema getSchema() { return SCHEMA$; }
049  // Used by DatumWriter.  Applications should not call.
050  public java.lang.Object get(int field$) {
051    switch (field$) {
052    case 0: return name;
053    case 1: return fullName;
054    case 2: return classNode;
055    case 3: return namedParameterNode;
056    case 4: return packageNode;
057    case 5: return children;
058    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
059    }
060  }
061
062  // Used by DatumReader.  Applications should not call.
063  @SuppressWarnings(value="unchecked")
064  public void put(int field$, java.lang.Object value$) {
065    switch (field$) {
066    case 0: name = (java.lang.CharSequence)value$; break;
067    case 1: fullName = (java.lang.CharSequence)value$; break;
068    case 2: classNode = (org.apache.reef.tang.implementation.avro.AvroClassNode)value$; break;
069    case 3: namedParameterNode = (org.apache.reef.tang.implementation.avro.AvroNamedParameterNode)value$; break;
070    case 4: packageNode = (org.apache.reef.tang.implementation.avro.AvroPackageNode)value$; break;
071    case 5: children = (java.util.List<org.apache.reef.tang.implementation.avro.AvroNode>)value$; break;
072    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
073    }
074  }
075
076  /**
077   * Gets the value of the 'name' field.
078   * @return The value of the 'name' field.
079   */
080  public java.lang.CharSequence getName() {
081    return name;
082  }
083
084  /**
085   * Sets the value of the 'name' field.
086   * @param value the value to set.
087   */
088  public void setName(java.lang.CharSequence value) {
089    this.name = value;
090  }
091
092  /**
093   * Gets the value of the 'fullName' field.
094   * @return The value of the 'fullName' field.
095   */
096  public java.lang.CharSequence getFullName() {
097    return fullName;
098  }
099
100  /**
101   * Sets the value of the 'fullName' field.
102   * @param value the value to set.
103   */
104  public void setFullName(java.lang.CharSequence value) {
105    this.fullName = value;
106  }
107
108  /**
109   * Gets the value of the 'classNode' field.
110   * @return The value of the 'classNode' field.
111   */
112  public org.apache.reef.tang.implementation.avro.AvroClassNode getClassNode() {
113    return classNode;
114  }
115
116  /**
117   * Sets the value of the 'classNode' field.
118   * @param value the value to set.
119   */
120  public void setClassNode(org.apache.reef.tang.implementation.avro.AvroClassNode value) {
121    this.classNode = value;
122  }
123
124  /**
125   * Gets the value of the 'namedParameterNode' field.
126   * @return The value of the 'namedParameterNode' field.
127   */
128  public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode getNamedParameterNode() {
129    return namedParameterNode;
130  }
131
132  /**
133   * Sets the value of the 'namedParameterNode' field.
134   * @param value the value to set.
135   */
136  public void setNamedParameterNode(org.apache.reef.tang.implementation.avro.AvroNamedParameterNode value) {
137    this.namedParameterNode = value;
138  }
139
140  /**
141   * Gets the value of the 'packageNode' field.
142   * @return The value of the 'packageNode' field.
143   */
144  public org.apache.reef.tang.implementation.avro.AvroPackageNode getPackageNode() {
145    return packageNode;
146  }
147
148  /**
149   * Sets the value of the 'packageNode' field.
150   * @param value the value to set.
151   */
152  public void setPackageNode(org.apache.reef.tang.implementation.avro.AvroPackageNode value) {
153    this.packageNode = value;
154  }
155
156  /**
157   * Gets the value of the 'children' field.
158   * @return The value of the 'children' field.
159   */
160  public java.util.List<org.apache.reef.tang.implementation.avro.AvroNode> getChildren() {
161    return children;
162  }
163
164  /**
165   * Sets the value of the 'children' field.
166   * @param value the value to set.
167   */
168  public void setChildren(java.util.List<org.apache.reef.tang.implementation.avro.AvroNode> value) {
169    this.children = value;
170  }
171
172  /**
173   * Creates a new AvroNode RecordBuilder.
174   * @return A new AvroNode RecordBuilder
175   */
176  public static org.apache.reef.tang.implementation.avro.AvroNode.Builder newBuilder() {
177    return new org.apache.reef.tang.implementation.avro.AvroNode.Builder();
178  }
179
180  /**
181   * Creates a new AvroNode RecordBuilder by copying an existing Builder.
182   * @param other The existing builder to copy.
183   * @return A new AvroNode RecordBuilder
184   */
185  public static org.apache.reef.tang.implementation.avro.AvroNode.Builder newBuilder(org.apache.reef.tang.implementation.avro.AvroNode.Builder other) {
186    return new org.apache.reef.tang.implementation.avro.AvroNode.Builder(other);
187  }
188
189  /**
190   * Creates a new AvroNode RecordBuilder by copying an existing AvroNode instance.
191   * @param other The existing instance to copy.
192   * @return A new AvroNode RecordBuilder
193   */
194  public static org.apache.reef.tang.implementation.avro.AvroNode.Builder newBuilder(org.apache.reef.tang.implementation.avro.AvroNode other) {
195    return new org.apache.reef.tang.implementation.avro.AvroNode.Builder(other);
196  }
197
198  /**
199   * RecordBuilder for AvroNode instances.
200   */
201  public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<AvroNode>
202    implements org.apache.avro.data.RecordBuilder<AvroNode> {
203
204    private java.lang.CharSequence name;
205    private java.lang.CharSequence fullName;
206    private org.apache.reef.tang.implementation.avro.AvroClassNode classNode;
207    private org.apache.reef.tang.implementation.avro.AvroClassNode.Builder classNodeBuilder;
208    private org.apache.reef.tang.implementation.avro.AvroNamedParameterNode namedParameterNode;
209    private org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder namedParameterNodeBuilder;
210    private org.apache.reef.tang.implementation.avro.AvroPackageNode packageNode;
211    private org.apache.reef.tang.implementation.avro.AvroPackageNode.Builder packageNodeBuilder;
212    private java.util.List<org.apache.reef.tang.implementation.avro.AvroNode> children;
213
214    /** Creates a new Builder */
215    private Builder() {
216      super(SCHEMA$);
217    }
218
219    /**
220     * Creates a Builder by copying an existing Builder.
221     * @param other The existing Builder to copy.
222     */
223    private Builder(org.apache.reef.tang.implementation.avro.AvroNode.Builder other) {
224      super(other);
225      if (isValidValue(fields()[0], other.name)) {
226        this.name = data().deepCopy(fields()[0].schema(), other.name);
227        fieldSetFlags()[0] = true;
228      }
229      if (isValidValue(fields()[1], other.fullName)) {
230        this.fullName = data().deepCopy(fields()[1].schema(), other.fullName);
231        fieldSetFlags()[1] = true;
232      }
233      if (isValidValue(fields()[2], other.classNode)) {
234        this.classNode = data().deepCopy(fields()[2].schema(), other.classNode);
235        fieldSetFlags()[2] = true;
236      }
237      if (other.hasClassNodeBuilder()) {
238        this.classNodeBuilder = org.apache.reef.tang.implementation.avro.AvroClassNode.newBuilder(other.getClassNodeBuilder());
239      }
240      if (isValidValue(fields()[3], other.namedParameterNode)) {
241        this.namedParameterNode = data().deepCopy(fields()[3].schema(), other.namedParameterNode);
242        fieldSetFlags()[3] = true;
243      }
244      if (other.hasNamedParameterNodeBuilder()) {
245        this.namedParameterNodeBuilder = org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.newBuilder(other.getNamedParameterNodeBuilder());
246      }
247      if (isValidValue(fields()[4], other.packageNode)) {
248        this.packageNode = data().deepCopy(fields()[4].schema(), other.packageNode);
249        fieldSetFlags()[4] = true;
250      }
251      if (other.hasPackageNodeBuilder()) {
252        this.packageNodeBuilder = org.apache.reef.tang.implementation.avro.AvroPackageNode.newBuilder(other.getPackageNodeBuilder());
253      }
254      if (isValidValue(fields()[5], other.children)) {
255        this.children = data().deepCopy(fields()[5].schema(), other.children);
256        fieldSetFlags()[5] = true;
257      }
258    }
259
260    /**
261     * Creates a Builder by copying an existing AvroNode instance
262     * @param other The existing instance to copy.
263     */
264    private Builder(org.apache.reef.tang.implementation.avro.AvroNode other) {
265            super(SCHEMA$);
266      if (isValidValue(fields()[0], other.name)) {
267        this.name = data().deepCopy(fields()[0].schema(), other.name);
268        fieldSetFlags()[0] = true;
269      }
270      if (isValidValue(fields()[1], other.fullName)) {
271        this.fullName = data().deepCopy(fields()[1].schema(), other.fullName);
272        fieldSetFlags()[1] = true;
273      }
274      if (isValidValue(fields()[2], other.classNode)) {
275        this.classNode = data().deepCopy(fields()[2].schema(), other.classNode);
276        fieldSetFlags()[2] = true;
277      }
278      this.classNodeBuilder = null;
279      if (isValidValue(fields()[3], other.namedParameterNode)) {
280        this.namedParameterNode = data().deepCopy(fields()[3].schema(), other.namedParameterNode);
281        fieldSetFlags()[3] = true;
282      }
283      this.namedParameterNodeBuilder = null;
284      if (isValidValue(fields()[4], other.packageNode)) {
285        this.packageNode = data().deepCopy(fields()[4].schema(), other.packageNode);
286        fieldSetFlags()[4] = true;
287      }
288      this.packageNodeBuilder = null;
289      if (isValidValue(fields()[5], other.children)) {
290        this.children = data().deepCopy(fields()[5].schema(), other.children);
291        fieldSetFlags()[5] = true;
292      }
293    }
294
295    /**
296      * Gets the value of the 'name' field.
297      * @return The value.
298      */
299    public java.lang.CharSequence getName() {
300      return name;
301    }
302
303    /**
304      * Sets the value of the 'name' field.
305      * @param value The value of 'name'.
306      * @return This builder.
307      */
308    public org.apache.reef.tang.implementation.avro.AvroNode.Builder setName(java.lang.CharSequence value) {
309      validate(fields()[0], value);
310      this.name = value;
311      fieldSetFlags()[0] = true;
312      return this;
313    }
314
315    /**
316      * Checks whether the 'name' field has been set.
317      * @return True if the 'name' field has been set, false otherwise.
318      */
319    public boolean hasName() {
320      return fieldSetFlags()[0];
321    }
322
323
324    /**
325      * Clears the value of the 'name' field.
326      * @return This builder.
327      */
328    public org.apache.reef.tang.implementation.avro.AvroNode.Builder clearName() {
329      name = null;
330      fieldSetFlags()[0] = false;
331      return this;
332    }
333
334    /**
335      * Gets the value of the 'fullName' field.
336      * @return The value.
337      */
338    public java.lang.CharSequence getFullName() {
339      return fullName;
340    }
341
342    /**
343      * Sets the value of the 'fullName' field.
344      * @param value The value of 'fullName'.
345      * @return This builder.
346      */
347    public org.apache.reef.tang.implementation.avro.AvroNode.Builder setFullName(java.lang.CharSequence value) {
348      validate(fields()[1], value);
349      this.fullName = value;
350      fieldSetFlags()[1] = true;
351      return this;
352    }
353
354    /**
355      * Checks whether the 'fullName' field has been set.
356      * @return True if the 'fullName' field has been set, false otherwise.
357      */
358    public boolean hasFullName() {
359      return fieldSetFlags()[1];
360    }
361
362
363    /**
364      * Clears the value of the 'fullName' field.
365      * @return This builder.
366      */
367    public org.apache.reef.tang.implementation.avro.AvroNode.Builder clearFullName() {
368      fullName = null;
369      fieldSetFlags()[1] = false;
370      return this;
371    }
372
373    /**
374      * Gets the value of the 'classNode' field.
375      * @return The value.
376      */
377    public org.apache.reef.tang.implementation.avro.AvroClassNode getClassNode() {
378      return classNode;
379    }
380
381    /**
382      * Sets the value of the 'classNode' field.
383      * @param value The value of 'classNode'.
384      * @return This builder.
385      */
386    public org.apache.reef.tang.implementation.avro.AvroNode.Builder setClassNode(org.apache.reef.tang.implementation.avro.AvroClassNode value) {
387      validate(fields()[2], value);
388      this.classNodeBuilder = null;
389      this.classNode = value;
390      fieldSetFlags()[2] = true;
391      return this;
392    }
393
394    /**
395      * Checks whether the 'classNode' field has been set.
396      * @return True if the 'classNode' field has been set, false otherwise.
397      */
398    public boolean hasClassNode() {
399      return fieldSetFlags()[2];
400    }
401
402    /**
403     * Gets the Builder instance for the 'classNode' field and creates one if it doesn't exist yet.
404     * @return This builder.
405     */
406    public org.apache.reef.tang.implementation.avro.AvroClassNode.Builder getClassNodeBuilder() {
407      if (classNodeBuilder == null) {
408        if (hasClassNode()) {
409          setClassNodeBuilder(org.apache.reef.tang.implementation.avro.AvroClassNode.newBuilder(classNode));
410        } else {
411          setClassNodeBuilder(org.apache.reef.tang.implementation.avro.AvroClassNode.newBuilder());
412        }
413      }
414      return classNodeBuilder;
415    }
416
417    /**
418     * Sets the Builder instance for the 'classNode' field
419     * @param value The builder instance that must be set.
420     * @return This builder.
421     */
422    public org.apache.reef.tang.implementation.avro.AvroNode.Builder setClassNodeBuilder(org.apache.reef.tang.implementation.avro.AvroClassNode.Builder value) {
423      clearClassNode();
424      classNodeBuilder = value;
425      return this;
426    }
427
428    /**
429     * Checks whether the 'classNode' field has an active Builder instance
430     * @return True if the 'classNode' field has an active Builder instance
431     */
432    public boolean hasClassNodeBuilder() {
433      return classNodeBuilder != null;
434    }
435
436    /**
437      * Clears the value of the 'classNode' field.
438      * @return This builder.
439      */
440    public org.apache.reef.tang.implementation.avro.AvroNode.Builder clearClassNode() {
441      classNode = null;
442      classNodeBuilder = null;
443      fieldSetFlags()[2] = false;
444      return this;
445    }
446
447    /**
448      * Gets the value of the 'namedParameterNode' field.
449      * @return The value.
450      */
451    public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode getNamedParameterNode() {
452      return namedParameterNode;
453    }
454
455    /**
456      * Sets the value of the 'namedParameterNode' field.
457      * @param value The value of 'namedParameterNode'.
458      * @return This builder.
459      */
460    public org.apache.reef.tang.implementation.avro.AvroNode.Builder setNamedParameterNode(org.apache.reef.tang.implementation.avro.AvroNamedParameterNode value) {
461      validate(fields()[3], value);
462      this.namedParameterNodeBuilder = null;
463      this.namedParameterNode = value;
464      fieldSetFlags()[3] = true;
465      return this;
466    }
467
468    /**
469      * Checks whether the 'namedParameterNode' field has been set.
470      * @return True if the 'namedParameterNode' field has been set, false otherwise.
471      */
472    public boolean hasNamedParameterNode() {
473      return fieldSetFlags()[3];
474    }
475
476    /**
477     * Gets the Builder instance for the 'namedParameterNode' field and creates one if it doesn't exist yet.
478     * @return This builder.
479     */
480    public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder getNamedParameterNodeBuilder() {
481      if (namedParameterNodeBuilder == null) {
482        if (hasNamedParameterNode()) {
483          setNamedParameterNodeBuilder(org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.newBuilder(namedParameterNode));
484        } else {
485          setNamedParameterNodeBuilder(org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.newBuilder());
486        }
487      }
488      return namedParameterNodeBuilder;
489    }
490
491    /**
492     * Sets the Builder instance for the 'namedParameterNode' field
493     * @param value The builder instance that must be set.
494     * @return This builder.
495     */
496    public org.apache.reef.tang.implementation.avro.AvroNode.Builder setNamedParameterNodeBuilder(org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder value) {
497      clearNamedParameterNode();
498      namedParameterNodeBuilder = value;
499      return this;
500    }
501
502    /**
503     * Checks whether the 'namedParameterNode' field has an active Builder instance
504     * @return True if the 'namedParameterNode' field has an active Builder instance
505     */
506    public boolean hasNamedParameterNodeBuilder() {
507      return namedParameterNodeBuilder != null;
508    }
509
510    /**
511      * Clears the value of the 'namedParameterNode' field.
512      * @return This builder.
513      */
514    public org.apache.reef.tang.implementation.avro.AvroNode.Builder clearNamedParameterNode() {
515      namedParameterNode = null;
516      namedParameterNodeBuilder = null;
517      fieldSetFlags()[3] = false;
518      return this;
519    }
520
521    /**
522      * Gets the value of the 'packageNode' field.
523      * @return The value.
524      */
525    public org.apache.reef.tang.implementation.avro.AvroPackageNode getPackageNode() {
526      return packageNode;
527    }
528
529    /**
530      * Sets the value of the 'packageNode' field.
531      * @param value The value of 'packageNode'.
532      * @return This builder.
533      */
534    public org.apache.reef.tang.implementation.avro.AvroNode.Builder setPackageNode(org.apache.reef.tang.implementation.avro.AvroPackageNode value) {
535      validate(fields()[4], value);
536      this.packageNodeBuilder = null;
537      this.packageNode = value;
538      fieldSetFlags()[4] = true;
539      return this;
540    }
541
542    /**
543      * Checks whether the 'packageNode' field has been set.
544      * @return True if the 'packageNode' field has been set, false otherwise.
545      */
546    public boolean hasPackageNode() {
547      return fieldSetFlags()[4];
548    }
549
550    /**
551     * Gets the Builder instance for the 'packageNode' field and creates one if it doesn't exist yet.
552     * @return This builder.
553     */
554    public org.apache.reef.tang.implementation.avro.AvroPackageNode.Builder getPackageNodeBuilder() {
555      if (packageNodeBuilder == null) {
556        if (hasPackageNode()) {
557          setPackageNodeBuilder(org.apache.reef.tang.implementation.avro.AvroPackageNode.newBuilder(packageNode));
558        } else {
559          setPackageNodeBuilder(org.apache.reef.tang.implementation.avro.AvroPackageNode.newBuilder());
560        }
561      }
562      return packageNodeBuilder;
563    }
564
565    /**
566     * Sets the Builder instance for the 'packageNode' field
567     * @param value The builder instance that must be set.
568     * @return This builder.
569     */
570    public org.apache.reef.tang.implementation.avro.AvroNode.Builder setPackageNodeBuilder(org.apache.reef.tang.implementation.avro.AvroPackageNode.Builder value) {
571      clearPackageNode();
572      packageNodeBuilder = value;
573      return this;
574    }
575
576    /**
577     * Checks whether the 'packageNode' field has an active Builder instance
578     * @return True if the 'packageNode' field has an active Builder instance
579     */
580    public boolean hasPackageNodeBuilder() {
581      return packageNodeBuilder != null;
582    }
583
584    /**
585      * Clears the value of the 'packageNode' field.
586      * @return This builder.
587      */
588    public org.apache.reef.tang.implementation.avro.AvroNode.Builder clearPackageNode() {
589      packageNode = null;
590      packageNodeBuilder = null;
591      fieldSetFlags()[4] = false;
592      return this;
593    }
594
595    /**
596      * Gets the value of the 'children' field.
597      * @return The value.
598      */
599    public java.util.List<org.apache.reef.tang.implementation.avro.AvroNode> getChildren() {
600      return children;
601    }
602
603    /**
604      * Sets the value of the 'children' field.
605      * @param value The value of 'children'.
606      * @return This builder.
607      */
608    public org.apache.reef.tang.implementation.avro.AvroNode.Builder setChildren(java.util.List<org.apache.reef.tang.implementation.avro.AvroNode> value) {
609      validate(fields()[5], value);
610      this.children = value;
611      fieldSetFlags()[5] = true;
612      return this;
613    }
614
615    /**
616      * Checks whether the 'children' field has been set.
617      * @return True if the 'children' field has been set, false otherwise.
618      */
619    public boolean hasChildren() {
620      return fieldSetFlags()[5];
621    }
622
623
624    /**
625      * Clears the value of the 'children' field.
626      * @return This builder.
627      */
628    public org.apache.reef.tang.implementation.avro.AvroNode.Builder clearChildren() {
629      children = null;
630      fieldSetFlags()[5] = false;
631      return this;
632    }
633
634    @Override
635    public AvroNode build() {
636      try {
637        AvroNode record = new AvroNode();
638        record.name = fieldSetFlags()[0] ? this.name : (java.lang.CharSequence) defaultValue(fields()[0]);
639        record.fullName = fieldSetFlags()[1] ? this.fullName : (java.lang.CharSequence) defaultValue(fields()[1]);
640        if (classNodeBuilder != null) {
641          record.classNode = this.classNodeBuilder.build();
642        } else {
643          record.classNode = fieldSetFlags()[2] ? this.classNode : (org.apache.reef.tang.implementation.avro.AvroClassNode) defaultValue(fields()[2]);
644        }
645        if (namedParameterNodeBuilder != null) {
646          record.namedParameterNode = this.namedParameterNodeBuilder.build();
647        } else {
648          record.namedParameterNode = fieldSetFlags()[3] ? this.namedParameterNode : (org.apache.reef.tang.implementation.avro.AvroNamedParameterNode) defaultValue(fields()[3]);
649        }
650        if (packageNodeBuilder != null) {
651          record.packageNode = this.packageNodeBuilder.build();
652        } else {
653          record.packageNode = fieldSetFlags()[4] ? this.packageNode : (org.apache.reef.tang.implementation.avro.AvroPackageNode) defaultValue(fields()[4]);
654        }
655        record.children = fieldSetFlags()[5] ? this.children : (java.util.List<org.apache.reef.tang.implementation.avro.AvroNode>) defaultValue(fields()[5]);
656        return record;
657      } catch (Exception e) {
658        throw new org.apache.avro.AvroRuntimeException(e);
659      }
660    }
661  }
662
663  private static final org.apache.avro.io.DatumWriter
664    WRITER$ = new org.apache.avro.specific.SpecificDatumWriter(SCHEMA$);
665
666  @Override public void writeExternal(java.io.ObjectOutput out)
667    throws java.io.IOException {
668    WRITER$.write(this, SpecificData.getEncoder(out));
669  }
670
671  private static final org.apache.avro.io.DatumReader
672    READER$ = new org.apache.avro.specific.SpecificDatumReader(SCHEMA$);
673
674  @Override public void readExternal(java.io.ObjectInput in)
675    throws java.io.IOException {
676    READER$.read(this, SpecificData.getDecoder(in));
677  }
678
679}