MutableDiagnostic

Mutable Diagnostic

Describes a class which carries fully mutable diagnostic information; this class is also made available reflectively for spawning new diagnostics from native contexts.

Diagnostics should always be finalized into a Diagnostic instance to enforce immutability and thread-safety.

See also

Canonical diagnostic type

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override var advice: String?

Optional corrective action to take, if any

Link copied to clipboard
open override var id: String?

ID or class for this diagnostic type, if supported.

Link copied to clipboard
open override var lang: String?

Name of a guest language from which this diagnostic arose, if known.

Link copied to clipboard
open override var message: String?

Message associated with the diagnostic

Link copied to clipboard
open override var position: SourceLocation?

Position in the source for the diagnostic, if any

Link copied to clipboard
open override var reference: SourceReference?

Reference to the source file or snippet of the diagnostic, if any

Link copied to clipboard
open override var renderedMessage: String?

Optionally contains a pre-formatted version of the message

Link copied to clipboard
open override var severity: Severity

Describes the severity of the diagnostic

Link copied to clipboard
open override var source: String?

Refers to the original processed source code

Link copied to clipboard
open override var span: SourceSpan?

Source span for the diagnostic, if any

Link copied to clipboard
open override var tool: String?

Name of the tool that generated the diagnostic, if known.

Functions

Link copied to clipboard

Build this mutable diagnostic into a finalized immutable record.

Link copied to clipboard
@JvmName(name = "setSeverity")
fun setSeverity(int: Int): MutableDiagnostic

Set the severity level using the native ordinal integer representing a given enumerated value.