APIdia Launch Partner
Top Description Fields Constructors Methods
javax.tools

public final Class DiagnosticCollector<S>

extends Object
implements DiagnosticListener<S>
Class Inheritance
All Implemented Interfaces
javax.tools.DiagnosticListener
Type Parameters
<S>
the type of source objects used by diagnostics received by this object
Imports
java.util.ArrayList, .Collections, .List, .Objects

Provides an easy way to collect diagnostics in a list.
Since
1.6

Field Summary

Modifier and TypeField and Description
private List<Diagnostic<? extends S>>

Constructor Summary

AccessConstructor and Description
public
DiagnosticCollector()

Creates a new instance of DiagnosticCollector.

Method Summary

Modifier and TypeMethod and Description
public List<Diagnostic<? extends S>>

Returns:

a list view of diagnostics
getDiagnostics
()

Returns a list view of diagnostics collected by this object.

public void
report(Diagnostic<? extends S> diagnostic)

Implements javax.tools.DiagnosticListener.report.

Invoked when a problem is found.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

diagnosticsback to summary
private List<Diagnostic<? extends S>> diagnostics

Constructor Detail

DiagnosticCollectorback to summary
public DiagnosticCollector()

Creates a new instance of DiagnosticCollector.

Method Detail

getDiagnosticsback to summary
public List<Diagnostic<? extends S>> getDiagnostics()

Returns a list view of diagnostics collected by this object.

Returns:List<Diagnostic<? extends S>>

a list view of diagnostics

reportback to summary
public void report(Diagnostic<? extends S> diagnostic)

Implements javax.tools.DiagnosticListener.report.

Doc from javax.tools.DiagnosticListener.report.

Invoked when a problem is found.

Annotations
@Override