Resolver

sealed interface Resolver<T : Any, Concrete : Symbolic<T>>

Symbolic: Resolver

Specifies the expected interface for a resolver of a symbolic type T to a concrete type Concrete. Implementors inheriting from this interface are allowed to produce null for a symbol; because of previous design decisions, the resolveSymbol method (deprecated) will throw an Unresolved exception if the symbol cannot be resolved.

A "sealed resolver" will throw an exception for all unresolved symbols.

Parameters

T

Symbolic type which can be resolved, by this resolver, to a Concrete type.

Concrete

Concrete type which can be resolved from type T.

See also

Inheritors

Functions

Link copied to clipboard
abstract fun resolve(symbol: T): Concrete?

Resolve the given symbol to a concrete type Concrete, or null if the symbol cannot be resolved.

Link copied to clipboard
open fun resolveSymbol(symbol: T): Concrete

Resolves a symbol or throws Unresolved; this interface is a hold-over from previous versions of Elide, and it is marked for deletion in the next release.