clikt / com.github.ajalt.clikt.core / findObject

findObject

inline fun <reified T : Any> CliktCommand.findObject(): ReadOnlyProperty<CliktCommand, T?>

Find the closest object of type T, or null

inline fun <reified T : Any> CliktCommand.findObject(crossinline default: () -> T): ReadOnlyProperty<CliktCommand, T>

Find the closest object of type T, setting context.obj if one is not found.