Class ProblemReporter


  • public class ProblemReporter
    extends java.lang.Object
    A simple interface where validators can report found problems.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.function.Consumer<Problem> problemConsumer  
    • Constructor Summary

      Constructors 
      Constructor Description
      ProblemReporter​(java.util.function.Consumer<Problem> problemConsumer)  
    • Field Detail

      • problemConsumer

        private final java.util.function.Consumer<Problem> problemConsumer
    • Constructor Detail

      • ProblemReporter

        public ProblemReporter​(java.util.function.Consumer<Problem> problemConsumer)
    • Method Detail

      • report

        public void report​(NodeWithTokenRange<?> node,
                           UpgradeJavaMessage message,
                           java.lang.Object... args)
        Report a problem.
        Parameters:
        message - description of the problem
        node - the node in which the problem occurred, used to find the Range of the problem.
      • report

        public void report​(NodeWithTokenRange<?> node,
                           java.lang.String message,
                           java.lang.Object... args)
        Report a problem.
        Parameters:
        message - description of the problem
        node - the node in which the problem occurred, used to find the Range of the problem.
      • report

        public void report​(TokenRange range,
                           java.lang.String message,
                           java.lang.Object... args)