CasePathFactory
A JVM-only root-scoped factory for conventional data-class CaseKeyPaths.
Obtain one with casePathsOf. pathFor reflects the referenced constructor once to locate its stored primary-constructor properties. Prefer generated catalogs for frequently used CaseKeyPaths; this convenience is intentionally isolated from kpaths-core because it needs Kotlin/JVM's full reflection implementation.
Functions
Link copied to clipboard
Creates a CaseKeyPath for a unary data-class case constructor.
fun <Case : Root, First, Second> pathFor(constructor: (First, Second) -> Case): CaseKeyPath<Root, Pair<First, Second>>
Creates a CaseKeyPath for a binary data-class case constructor, focused as an ordered Pair.
fun <Case : Root, First, Second, Third> pathFor(constructor: (First, Second, Third) -> Case): CaseKeyPath<Root, Triple<First, Second, Third>>
Creates a CaseKeyPath for a ternary data-class case constructor, focused as an ordered Triple.