DiagnosticPass

Base class for implementing pipeline diagnostics.

Implementations of this class should be aware of the following constraints:

Inheritors

Constructors

Link copied to clipboard
protected constructor()

Types

Link copied to clipboard
data class Diagnostic(val message: String, val _severity: DiagnosticPass.Diagnostic.Severity?, val _context: Map<String, Any?>?)

Data class representing an emitted diagnostic.

Link copied to clipboard
protected abstract class DiagnosticUnit<T> : Function1<T, DiagnosticPass.Diagnostic?> , Predicate<T>

Base class for implementing one specific diagnostic check.

Link copied to clipboard
abstract class Error : DiagnosticPass

A diagnostic pass which has error severity.

Link copied to clipboard
abstract class Warning : DiagnosticPass

A diagnostic pass which has warning severity.

Functions

Link copied to clipboard
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Performs an equality check between this object and other.

Link copied to clipboard
fun DiagnosticPass.handleFailure(pipeline: Pipeline, onWarn: (List<Throwable>) -> Unit = {}, onErr: (List<Throwable>) -> Unit = {})

Verifies whether the pipeline passes this diagnostic as if by calling invoke, and invokes onWarn or onErr depending on whether this diagnostic is a DiagnosticPass.Warning or DiagnosticPass.Error respectively.

Link copied to clipboard
open override fun hashCode(): Int

Hashes this DiagnosticPass object using kotlin.reflect.KClass.hashCode of this class.

Link copied to clipboard
abstract operator override fun invoke(pipeline: Pipeline): List<Throwable>

Implementation of the diagnostic.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override fun test(pipeline: Pipeline): Boolean
Link copied to clipboard
fun verify(pipeline: Pipeline)

Verifies whether the pipeline passes this diagnostic as if by calling invoke, and throwing a VerificationException if it does not.