org.apache.avro.reflect

## Class ReflectData.AllowNull

- java.lang.Object
- - org.apache.avro.generic.GenericData
  - - org.apache.avro.specific.SpecificData
    - - org.apache.avro.reflect.ReflectData
      - - org.apache.avro.reflect.ReflectData.AllowNull

- Enclosing class:
    ReflectData

      public static class ReflectData.AllowNull
      extends ReflectData

  `ReflectData` implementation that permits null field values. The schema generated for each field is a union of its declared type and null.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.avro.reflect.ReflectData

      `ReflectData.AllowNull`

    - ### Nested classes/interfaces inherited from class org.apache.avro.specific.SpecificData

      `SpecificData.SchemaConstructable`

    - ### Nested classes/interfaces inherited from class org.apache.avro.generic.GenericData

      `GenericData.Array<T>, GenericData.EnumSymbol, GenericData.Fixed, GenericData.InstanceSupplier, GenericData.Record, GenericData.StringType`

  - ### Field Summary

    - ### Fields inherited from class org.apache.avro.specific.SpecificData

      `CLASS_PROP, ELEMENT_PROP, KEY_CLASS_PROP, RESERVED_WORD_ESCAPE_CHAR, RESERVED_WORDS, stringableClasses`

    - ### Fields inherited from class org.apache.avro.generic.GenericData

      `FAST_READER_PROP, STRING_PROP, STRING_TYPE_STRING`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AllowNull()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Schema` | `createFieldSchema(Field field, Map<String,Schema> names)` Create a schema for a field.
    `static ReflectData.AllowNull` | `get()` Return the singleton instance.

    - ### Methods inherited from class org.apache.avro.reflect.ReflectData

      `addStringable, compare, createDatumReader, createDatumReader, createDatumWriter, createFixed, createSchema, createSchemaDefaultValue, getArrayAsCollection, getClass, getField, getField, getOrCreateDefaultValue, getOrCreateDefaultValue, getProtocol, getRecordSchema, getRecordState, isArray, isBytes, isMap, isRecord, isStringable, makeNullable, newRecord, setDefaultGeneratedValue, setDefaultsGenerated, setField, setField, useCustomCoders, validate`

    - ### Methods inherited from class org.apache.avro.specific.SpecificData

      `createEnum, createString, getClassName, getDecoder, getEncoder, getEnumSchema, getForClass, getForSchema, getNewRecordSupplier, getSchema, getSchemaName, isEnum, isStringType, newInstance, setCustomCoders, unmangle`

    - ### Methods inherited from class org.apache.avro.generic.GenericData

      `addLogicalTypeConversion, compare, compareMaps, createFixed, deepCopy, getClassLoader, getConversionByClass, getConversionByClass, getConversionFor, getConversions, getDefaultValue, getFastReaderBuilder, getFixedSchema, getPrimitiveTypeCache, hashCode, hashCodeAdd, induce, instanceOf, isBoolean, isDouble, isFastReaderEnabled, isFixed, isFloat, isInteger, isLong, isString, newArray, newMap, resolveUnion, setFastReaderEnabled, setStringType, toString, toString`

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

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

- - ### Constructor Detail

    - #### AllowNull

          public AllowNull()

  - ### Method Detail

    - #### get

          public static ReflectData.AllowNull get()

      Return the singleton instance.

    - #### createFieldSchema

          protected Schema createFieldSchema(Field field,
                                             Map<String,Schema> names)

      Description copied from class: `ReflectData`
      Create a schema for a field.
      Overrides:
        `createFieldSchema` in class `ReflectData`

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