com.fasterxml.jackson.dataformat.avro.deser

## Class AvroStructureReader

- java.lang.Object
- - com.fasterxml.jackson.core.JsonStreamContext
  - - com.fasterxml.jackson.dataformat.avro.deser.AvroReadContext
    - - com.fasterxml.jackson.dataformat.avro.deser.AvroStructureReader

- Direct Known Subclasses:
    ArrayReader, MapReader

      public abstract class AvroStructureReader
      extends AvroReadContext

  Base class for handlers for Avro structured types (or in some cases, scalar types that need to be exposed in unified way similar to structured types).

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected com.fasterxml.jackson.core.JsonToken` | `_currToken`

    - ### Fields inherited from class com.fasterxml.jackson.dataformat.avro.deser.AvroReadContext

      `_currentValue, _parent, _typeId`

    - ### Fields inherited from class com.fasterxml.jackson.core.JsonStreamContext

      `_index, _type, TYPE_ARRAY, TYPE_OBJECT, TYPE_ROOT`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AvroStructureReader(AvroReadContext parent, int type, String typeId)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected <T> T` | `_throwUnsupported()`
    `boolean` | `consumesNoContent()` Method that may be called to check if the values "read" by this reader are zero-length, that is, consume no content: most common example being Record with no fields.
    `com.fasterxml.jackson.core.JsonToken` | `getCurrentToken()`
    `abstract AvroStructureReader` | `newReader(AvroReadContext parent, AvroParserImpl parser)` Method for creating actual instance to use for reading (initial instance constructed is so-called blue print).
    `abstract com.fasterxml.jackson.core.JsonToken` | `nextToken()`
    `abstract void` | `skipValue(AvroParserImpl parser)` Alternative to `nextToken()` which will simply skip the full value.
    `protected void` | `throwIllegalState(int state)`

    - ### Methods inherited from class com.fasterxml.jackson.dataformat.avro.deser.AvroReadContext

      `_reportError, appendDesc, getCurrentName, getCurrentValue, getParent, getRemainingElements, getTypeId, nextFieldName, setCurrentValue, toString`

    - ### Methods inherited from class com.fasterxml.jackson.core.JsonStreamContext

      `getCurrentIndex, getEntryCount, getStartLocation, getTypeDesc, hasCurrentIndex, hasCurrentName, hasPathSegment, inArray, inObject, inRoot, pathAsPointer, pathAsPointer, typeDesc`

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

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

- - ### Field Detail

    - #### _currToken

          protected com.fasterxml.jackson.core.JsonToken _currToken

  - ### Constructor Detail

    - #### AvroStructureReader

          protected AvroStructureReader(AvroReadContext parent,
                                        int type,
                                        String typeId)

  - ### Method Detail

    - #### consumesNoContent

          public boolean consumesNoContent()

      Method that may be called to check if the values "read" by this reader are zero-length, that is, consume no content: most common example being Record with no fields.

      Note: Arrays can not return `true` as they need to encode length even for "empty" arrays.

      Since:
        2.10

    - #### newReader

          public abstract AvroStructureReader newReader(AvroReadContext parent,
                                                        AvroParserImpl parser)

      Method for creating actual instance to use for reading (initial instance constructed is so-called blue print).

    - #### nextToken

          public abstract com.fasterxml.jackson.core.JsonToken nextToken()
                                                                  throws IOException

      Specified by:
        `nextToken` in class `AvroReadContext`
      Throws:
        `IOException`

    - #### skipValue

          public abstract void skipValue(AvroParserImpl parser)
                                  throws IOException

      Alternative to `nextToken()` which will simply skip the full value.
      Specified by:
        `skipValue` in class `AvroReadContext`
      Throws:
        `IOException`

    - #### getCurrentToken

          public final com.fasterxml.jackson.core.JsonToken getCurrentToken()

      Specified by:
        `getCurrentToken` in class `AvroReadContext`

    - #### throwIllegalState

          protected void throwIllegalState(int state)

    - #### _throwUnsupported

          protected <T> T _throwUnsupported()

Copyright © 2019 FasterXML. All rights reserved.