Class Collector
java.lang.Object
org.glassfish.jersey.inject.cdi.se.injector.Collector
This class collects errors, and can then also produce a MultiException from those errors if necessary.
- Author:
- John Wells (john.wells at oracle.com)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
MergesMultiException
with allthrowables
registered in it.void
Adds a throwable to the list of throwables in this collector.boolean
Returns true if this collector has errors.void
This method will throw if the list of throwables associated with this collector is not empty.
-
Constructor Details
-
Collector
public Collector()
-
-
Method Details
-
addMultiException
MergesMultiException
with allthrowables
registered in it.- Parameters:
me
-MultiException
to merge.
-
addThrowable
Adds a throwable to the list of throwables in this collector.- Parameters:
th
- The throwable to add to the list.
-
throwIfErrors
This method will throw if the list of throwables associated with this collector is not empty.- Throws:
MultiException
- An exception with all the throwables found in this collector.
-
hasErrors
public boolean hasErrors()Returns true if this collector has errors.- Returns:
- true if the collector has errors.
-