org.apache.avro

## Class SchemaBuilder.NamespacedBuilder<R,S extends SchemaBuilder.NamespacedBuilder<R,S>>

- java.lang.Object
- - org.apache.avro.SchemaBuilder.PropBuilder<S>
  - - org.apache.avro.SchemaBuilder.NamedBuilder<S>
    - - org.apache.avro.SchemaBuilder.NamespacedBuilder<R,S>

- Direct Known Subclasses:
    SchemaBuilder.EnumBuilder, SchemaBuilder.FixedBuilder, SchemaBuilder.RecordBuilder
  Enclosing class:
    SchemaBuilder

      public abstract static class SchemaBuilder.NamespacedBuilder<R,S extends SchemaBuilder.NamespacedBuilder<R,S>>
      extends SchemaBuilder.NamedBuilder<S>

  An abstract type that provides builder methods for configuring the namespace for all Avro types that have namespaces (Fixed, Record, and Enum).

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `NamespacedBuilder(org.apache.avro.SchemaBuilder.Completion<R> context, org.apache.avro.SchemaBuilder.NameContext names, String name)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `S` | `namespace(String namespace)` Set the namespace of this type.

    - ### Methods inherited from class org.apache.avro.SchemaBuilder.NamedBuilder

      `aliases, doc`

    - ### Methods inherited from class org.apache.avro.SchemaBuilder.PropBuilder

      `prop, prop, self`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NamespacedBuilder

          protected NamespacedBuilder(org.apache.avro.SchemaBuilder.Completion<R> context,
                                      org.apache.avro.SchemaBuilder.NameContext names,
                                      String name)

  - ### Method Detail

    - #### namespace

          public final S namespace(String namespace)

      Set the namespace of this type. To clear the namespace, set empty string.

      When the namespace is null or unset, the namespace of the type defaults to the namespace of the enclosing context.

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.