Package org.apache.avro.io.parsing
Class ValidatingGrammarGenerator
java.lang.Object
org.apache.avro.io.parsing.ValidatingGrammarGenerator
- Direct Known Subclasses:
JsonGrammarGenerator
,ResolvingGrammarGenerator
The class that generates validating grammar.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the non-terminal that is the start symbol for the grammar for the given schema sc.Returns the non-terminal that is the start symbol for the grammar for the given schema sc.
-
Constructor Details
-
ValidatingGrammarGenerator
public ValidatingGrammarGenerator()
-
-
Method Details
-
generate
Returns the non-terminal that is the start symbol for the grammar for the given schema sc. -
generate
public Symbol generate(Schema sc, Map<org.apache.avro.io.parsing.ValidatingGrammarGenerator.LitS, Symbol> seen) Returns the non-terminal that is the start symbol for the grammar for the given schema sc. If there is already an entry for the given schema in the given map seen then that entry is returned. Otherwise a new symbol is generated and an entry is inserted into the map.- Parameters:
sc
- The schema for which the start symbol is requiredseen
- A map of schema to symbol mapping done so far.- Returns:
- The start symbol for the schema
-