Class DefaultProblemCollector

java.lang.Object
org.apache.maven.building.DefaultProblemCollector
All Implemented Interfaces:
ProblemCollector

class DefaultProblemCollector extends Object implements ProblemCollector
Collects problems that are encountered during settings building.
  • Field Details

  • Constructor Details

    • DefaultProblemCollector

      DefaultProblemCollector(List<Problem> problems)
  • Method Details

    • getProblems

      public List<Problem> getProblems()
      Specified by:
      getProblems in interface ProblemCollector
      Returns:
      the collected Problems, never null
    • setSource

      public void setSource(String source)
      Description copied from interface: ProblemCollector
      The next messages will be bound to this source. When calling this method again, previous messages keep their source, but the next messages will use the new source.
      Specified by:
      setSource in interface ProblemCollector
    • add

      public void add(Problem.Severity severity, String message, int line, int column, Exception cause)
      Description copied from interface: ProblemCollector
      Adds the specified problem. Either message or exception is required
      Specified by:
      add in interface ProblemCollector
      Parameters:
      severity - The severity of the problem, must not be null.
      message - The detail message of the problem, may be null.
      line - The one-based index of the line containing the problem or -1 if unknown.
      column - The one-based index of the column containing the problem or -1 if unknown.
      cause - The cause of the problem, may be null.