AbstractPathBuilder

An abstract base class for creating a scope resolution Path using a DSL. It provides a fluent API for building a path to a nested scope.

Example Usage:

subScope { find of scope<ViewModelScope>() of scope<ActivityScope>() of Root }

Parameters

T

The concrete type of the path builder, used for fluent method chaining.

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val find: T

A starting point for the DSL chain. Returns the concrete builder instance.

Link copied to clipboard
abstract val path: Path

The Path object being constructed by the builder.

Functions

Link copied to clipboard
infix fun of(root: Root): Path

Finalizes the path construction, returning the completed Path object. This should be the last call in the DSL chain, terminating at the Root of the scope hierarchy.

infix fun of(qualifier: Qualifier): T

Appends a Qualifier to the current path, representing a step down into a child scope. The of is used as an infix operator to create a natural, readable DSL.

Link copied to clipboard
inline fun <T : Any> scope(qualifier: Qualifier = TypeQualifier(T::class)): Qualifier

Creates a TypeQualifier for the given type T, to be used within the path.