Top Description Fields Constructors Methods
org.jvnet.hk2.internal

public Class Collector

extends Object
Class Inheritance
Imports
java.util.LinkedHashSet, .LinkedList, org.glassfish.hk2.api.MultiException

This class collects errors, and can then also produce a MultiException from those errors if necessary
Author
jwells

Field Summary

Modifier and TypeField and Description
private LinkedHashSet<Throwable>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
addThrowable(Throwable
The throwable to add to the list
th
)

Adds a throwable to the list of throwables in this collector

public boolean

Returns:

true if the collector has errors
hasErrors
()

Returns true if this collector has errors

public void
throwIfErrors()

This method will throw if the list of throwables associated with this collector is not empty

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

throwablesback to summary
private LinkedHashSet<Throwable> throwables

Constructor Detail

Collectorback to summary
public Collector()

Method Detail

addMultiExceptionback to summary
public void addMultiException(MultiException me)
addThrowableback to summary
public void addThrowable(Throwable th)

Adds a throwable to the list of throwables in this collector

Parameters
th:Throwable

The throwable to add to the list

hasErrorsback to summary
public boolean hasErrors()

Returns true if this collector has errors

Returns:boolean

true if the collector has errors

throwIfErrorsback to summary
public void throwIfErrors() throws MultiException

This method will throw if the list of throwables associated with this collector is not empty

Exceptions
MultiException:
An exception with all the throwables found in this collector