ResultApi

@ApiStatus.Experimental
interface ResultApi

API for reflectively providing results from a config using string scopes rather than direct access.

Author

fzzyhmstrs

Since

0.5.3

Inheritors

Functions

Link copied to clipboard
@ApiStatus.Experimental
abstract fun <T : Any> createResultProvider(fallback: Supplier<T>, clazz: KClass<T>): ResultProvider<T>
@ApiStatus.Experimental
abstract fun <T : Any> createResultProvider(fallback: Supplier<T>, drillFunction: ResultProviderSupplier<T>): ResultProvider<T>

Creates a result provider that will return values of the given type from a config. This provider will inspect the registered config matching to the scope provided, utilizing the fallback instead if a valid scope isn't provided.

Link copied to clipboard
@ApiStatus.Experimental
abstract fun <T : Any> createSimpleResultProvider(fallback: T, clazz: KClass<T>): ResultProvider<T>
@ApiStatus.Experimental
abstract fun <T : Any> createSimpleResultProvider(fallback: T, drillFunction: ResultProviderSupplier<T>): ResultProvider<T>

Creates a result provider that will return values of the given type from a config. This provider will inspect the registered config matching to the scope provided, utilizing the fallback instead if a valid scope isn't provided.