DiagnosticReporter class
An object used to create diagnostics and report them to a diagnostic listener.
- Annotations
-
- @AnalyzerPublicApi.new(message: 'Exported by package:analyzer/error/listener.dart')
Constructors
- DiagnosticReporter(DiagnosticOrErrorListener _diagnosticListener, Source _source)
-
Initializes a newly created error reporter that will report diagnostics to the
given
_diagnosticListener.
Properties
Methods
-
atConstructorDeclaration(
ConstructorDeclaration node, DiagnosticCode diagnosticCode, {List< Object> ? arguments, List<DiagnosticMessage> ? contextMessages}) → Diagnostic -
Reports a diagnostic with the given
diagnosticCodeandarguments. -
atElement2(
Element element, DiagnosticCode diagnosticCode, {List< Object> ? arguments, List<DiagnosticMessage> ? contextMessages}) → Diagnostic -
Reports a diagnostic with the given
diagnosticCodeandarguments. -
atEntity(
SyntacticEntity entity, DiagnosticCode diagnosticCode, {List< Object> ? arguments, List<DiagnosticMessage> ? contextMessages}) → Diagnostic -
Reports a diagnostic with the given
diagnosticCodeandarguments. -
atNode(
AstNode node, DiagnosticCode diagnosticCode, {List< Object> ? arguments, List<DiagnosticMessage> ? contextMessages}) → Diagnostic -
Reports a diagnostic with the given
diagnosticCodeandarguments. -
atOffset(
{required int offset, required int length, required DiagnosticCode diagnosticCode, List< Object> ? arguments, List<DiagnosticMessage> ? contextMessages}) → Diagnostic -
Reports a diagnostic with the given
diagnosticCodeandarguments. -
atSourceSpan(
SourceSpan span, DiagnosticCode diagnosticCode, {List< Object> ? arguments, List<DiagnosticMessage> ? contextMessages}) → Diagnostic -
Reports a diagnostic with the given
diagnosticCodeandarguments. -
atToken(
Token token, DiagnosticCode diagnosticCode, {List< Object> ? arguments, List<DiagnosticMessage> ? contextMessages}) → Diagnostic -
Reports a diagnostic with the given
diagnosticCodeandarguments. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reportError(
Diagnostic diagnostic) → void -
Report the given
diagnostic. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited