Package org.apache.daffodil.api
Interface WithDiagnostics
- All Known Subinterfaces:
CodeGenerator
,DataProcessor
,ParseResult
,ProcessorFactory
,Result
,UnparseResult
public interface WithDiagnostics
Interface that adds diagnostic information to classes that extend it.
When a function returns a class that extend this, one should call
WithDiagnostics.isError
on that class before performing any further
actions. If an error exists, any use of that class, aside from those
functions in WithDiagnostics
, is invalid and will result in an
Exception.
-
Method Summary
Modifier and TypeMethodDescriptionGet the list ofDiagnostic
's created during the construction of the parent objectboolean
isError()
Determine if any errors occurred in the creation of the parent object.
-
Method Details
-
isError
boolean isError()Determine if any errors occurred in the creation of the parent object.- Returns:
- true if it represents an error, false otherwise
-
getDiagnostics
List<Diagnostic> getDiagnostics()Get the list ofDiagnostic
's created during the construction of the parent object- Returns:
- list of
Diagnostic
's. May contain errors or warnings, and so may be non-empty even ifWithDiagnostics.isError
is false.
-