org.apache.avro.io.parsing

## Class ResolvingGrammarGenerator

- java.lang.Object
- - org.apache.avro.io.parsing.ValidatingGrammarGenerator
  - - org.apache.avro.io.parsing.ResolvingGrammarGenerator

    public class ResolvingGrammarGenerator
    extends ValidatingGrammarGenerator

The class that generates a resolving grammar to resolve between two schemas.

### Constructor Summary

Constructors
Constructor and Description
`ResolvingGrammarGenerator()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static void` `encode(Encoder e, Schema s, com.fasterxml.jackson.databind.JsonNode n)` Encodes the given Json node `n` on to the encoder `e` according to the schema `s`.
`Symbol` `generate(Schema writer, Schema reader)` Resolves the writer schema `writer` and the reader schema `reader` and returns the start symbol for the grammar generated.

### Methods inherited from class org.apache.avro.io.parsing.ValidatingGrammarGenerator

`generate, generate`

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

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

### Constructor Detail

#### ResolvingGrammarGenerator

    public ResolvingGrammarGenerator()

### Method Detail

#### generate

    public final Symbol generate(Schema writer,
                                 Schema reader)
                          throws IOException

Resolves the writer schema `writer` and the reader schema `reader` and returns the start symbol for the grammar generated.

Parameters:
  `writer` - The schema used by the writer
  `reader` - The schema used by the reader
Returns:
  The start symbol for the resolving grammar
Throws:
  `IOException`

#### encode

    public static void encode(Encoder e,
                              Schema s,
                              com.fasterxml.jackson.databind.JsonNode n)
                       throws IOException

Encodes the given Json node `n` on to the encoder `e` according to the schema `s`.

Parameters:
  `e` - The encoder to encode into.
  `s` - The schema for the object being encoded.
  `n` - The Json node to encode.
Throws:
  `IOException`