Interface LogicalTypeAnnotation.LogicalTypeAnnotationVisitor<T>

  • Enclosing class:
    LogicalTypeAnnotation

    public static interface LogicalTypeAnnotation.LogicalTypeAnnotationVisitor<T>
    Implement this interface to visit a logical type annotation in the schema. The default implementation for each logical type specific visitor method is empty.

    Example usage: logicalTypeAnnotation.accept(new LogicalTypeAnnotationVisitor() { ... }); Every visit method returns Optional.empty() by default. It means that for the given logical type no specific action is needed. Client code can use Optional.orElse(Object) to return a default value for unhandled types, or Optional.orElseThrow(Supplier) to throw exception if omitting a type is not allowed.