DiagnosticCollector (Java SE 16 & JDK 16) (original) (raw)
Type Parameters:
S
- the type of source objects used by diagnostics received by this object
All Implemented Interfaces:
[DiagnosticListener](DiagnosticListener.html "interface in javax.tools")<S>
Provides an easy way to collect diagnostics in a list.
Since:
1.6
Constructor Summary
Constructors
Creates a new instance of DiagnosticCollector.
Method Summary
Returns a list view of diagnostics collected by this object.void
Invoked when a problem is found.
Methods declared in class java.lang.Object
[clone](../../../java.base/java/lang/Object.html#clone%28%29), [equals](../../../java.base/java/lang/Object.html#equals%28java.lang.Object%29), [finalize](../../../java.base/java/lang/Object.html#finalize%28%29), [getClass](../../../java.base/java/lang/Object.html#getClass%28%29), [hashCode](../../../java.base/java/lang/Object.html#hashCode%28%29), [notify](../../../java.base/java/lang/Object.html#notify%28%29), [notifyAll](../../../java.base/java/lang/Object.html#notifyAll%28%29), [toString](../../../java.base/java/lang/Object.html#toString%28%29), [wait](../../../java.base/java/lang/Object.html#wait%28%29), [wait](../../../java.base/java/lang/Object.html#wait%28long%29), [wait](../../../java.base/java/lang/Object.html#wait%28long,int%29)
Constructor Details
DiagnosticCollector
public DiagnosticCollector()
Creates a new instance of DiagnosticCollector.Method Details
report
public void report​(Diagnostic<? extends S> diagnostic)
Invoked when a problem is found.
Specified by:
[report](DiagnosticListener.html#report%28javax.tools.Diagnostic%29)
in interface[DiagnosticListener](DiagnosticListener.html "interface in javax.tools")<[S](DiagnosticCollector.html "type parameter in DiagnosticCollector")>
Parameters:
diagnostic
- a diagnostic representing the problem that was foundgetDiagnostics
Returns a list view of diagnostics collected by this object.
Returns:
a list view of diagnostics