Class ProblemCollector.Impl<P extends BuilderProblem>
java.lang.Object
org.apache.maven.api.services.ProblemCollector.Impl<P>
- Type Parameters:
P- the type of problem
- All Implemented Interfaces:
ProblemCollector<P>
- Enclosing interface:
ProblemCollector<P extends BuilderProblem>
public static class ProblemCollector.Impl<P extends BuilderProblem>
extends Object
implements ProblemCollector<P>
Default implementation of the ProblemCollector interface.
- Since:
- 4.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.maven.api.services.ProblemCollector
ProblemCollector.Impl<P extends BuilderProblem> -
Method Summary
Modifier and TypeMethodDescriptionproblems(BuilderProblem.Severity severity) Returns all reported and preserved problems for given severity.booleanReturnstrueif reported problem count exceeded allowed count, and issues were lost.intproblemsReportedFor(BuilderProblem.Severity... severity) Returns count of problems reported for given severities.booleanreportProblem(P problem) Reports a problem: always maintains the counters, but whether problem is preserved in memory, depends on implementation and its configuration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.api.services.ProblemCollector
hasErrorProblems, hasFatalProblems, hasProblemsFor, hasWarningProblems, problems, totalProblemsReported
-
Method Details
-
problemsReportedFor
Description copied from interface:ProblemCollectorReturns count of problems reported for given severities.- Specified by:
problemsReportedForin interfaceProblemCollector<P extends BuilderProblem>- Parameters:
severity- the severity levels to count problems for- Returns:
- the total count of problems for the specified severities
-
problemsOverflow
public boolean problemsOverflow()Description copied from interface:ProblemCollectorReturnstrueif reported problem count exceeded allowed count, and issues were lost. When this method returnstrue, it means that element count of stream returned by methodProblemCollector.problems()and the counter returned byProblemCollector.totalProblemsReported()are not equal (latter is bigger than former).- Specified by:
problemsOverflowin interfaceProblemCollector<P extends BuilderProblem>- Returns:
- true if the problem collector has overflowed and some problems were not preserved
-
reportProblem
Description copied from interface:ProblemCollectorReports a problem: always maintains the counters, but whether problem is preserved in memory, depends on implementation and its configuration.- Specified by:
reportProblemin interfaceProblemCollector<P extends BuilderProblem>- Parameters:
problem- the problem to report- Returns:
trueif passed problem is preserved by this call.
-
problems
Description copied from interface:ProblemCollectorReturns all reported and preserved problems for given severity. Note: counters and element count in this stream does not have to be equal.- Specified by:
problemsin interfaceProblemCollector<P extends BuilderProblem>- Parameters:
severity- the severity level to get problems for- Returns:
- a stream of problems with the specified severity
-