Interface Directive.DirectiveErrorConsumer

Enclosing class:
Directive
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Directive.DirectiveErrorConsumer
A callback interface for receiving errors and warnings encountered while parsing a single directive's values.

A valueIndex of -1 indicates the error does not pertain to a specific value within the directive.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    A no-op consumer that silently ignores all errors.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(Policy.Severity severity, String message, int valueIndex)
    Called when a parsing error or warning is encountered.
  • Field Details

  • Method Details

    • add

      void add(Policy.Severity severity, String message, int valueIndex)
      Called when a parsing error or warning is encountered.
      Parameters:
      severity - the severity of the issue
      message - a human-readable description of the issue
      valueIndex - the zero-based index of the value within the directive, or -1 if the issue does not pertain to a specific value