Class SchemasWithClasses

  • All Implemented Interfaces:
    SchemaVisitor<Map<String,​org.apache.avro.Schema>>

    public final class SchemasWithClasses
    extends Object
    implements SchemaVisitor<Map<String,​org.apache.avro.Schema>>
    A visitor that recursively visits a schema and returns a map like: java class name -> Schema for every Schema encountered that has a java class implementation.
    Author:
    zoly
    • Constructor Detail

      • SchemasWithClasses

        public SchemasWithClasses()
    • Method Detail

      • visitTerminal

        public SchemaVisitorAction visitTerminal​(org.apache.avro.Schema schema)
        Description copied from interface: SchemaVisitor
        Invoked for schemas that do not have "child" schemas or for a previously encountered schema with children which will be treated as a terminal. (to avoid circular recursion)
        Specified by:
        visitTerminal in interface SchemaVisitor<Map<String,​org.apache.avro.Schema>>
        Returns:
      • get

        public Map<String,​org.apache.avro.Schema> get()
        Description copied from interface: SchemaVisitor
        Invoked when visiting is complete.
        Specified by:
        get in interface SchemaVisitor<Map<String,​org.apache.avro.Schema>>
        Returns:
        a value which will be returned by the visit method.