Class SchemaUtil.SchemaTraversal<T extends Exception>

  • Type Parameters:
    T - exception class
    Enclosing class:
    SchemaUtil

    public abstract static class SchemaUtil.SchemaTraversal<T extends Exception>
    extends Object
    a class that can be used to traverse all nested schemas in a schema
    • Constructor Detail

      • SchemaTraversal

        public SchemaTraversal()
    • Method Detail

      • visitSchema

        public void visitSchema​(Schema schema,
                                String fieldPath)
                         throws T extends Exception
        This method will be called for each and every schema
        Parameters:
        schema - the current schema
        fieldPath - field path
        Throws:
        T - exception class supplied as a parameter
        T extends Exception
      • visitField

        public void visitField​(Schema.Field field,
                               String fieldPath)
                        throws T extends Exception
        This method will be called for each and every field in the schema, including nested fields and fields in lists of tuples
        Parameters:
        field - field
        fieldPath - field path
        Throws:
        T
        T extends Exception
      • run

        public void run​(Schema schema,
                        String path)
                 throws T extends Exception
        Run the schema visitor
        Parameters:
        schema - the schema to visit
        path - path
        Throws:
        T - exception class supplied as a parameter
        T extends Exception