optionalEntry

inline fun <T : Any> Provider<ConfigProvider>.optionalEntry(vararg path: String): Provider<T?>
inline fun <T : Any> ConfigProvider.optionalEntry(vararg path: String): Provider<T?>

Gets an optional entry Provider for a value of type T under path, whose value will be null if the entry does not exist or could not be deserialized due to SerializationException.

The returned provider will only be stored in a WeakReference in the parent provider.


inline fun <T : Any> Provider<ConfigProvider>.optionalEntry(vararg paths: List<String>): Provider<T?>
inline fun <T : Any> ConfigProvider.optionalEntry(vararg paths: List<String>): Provider<T?>

Gets an optional entry Provider for a value of type T under the first existing path from paths, whose value will be null if no entry exists or could not be deserialized due to SerializationException.

The returned provider will only be stored in a WeakReference in the parent provider.


fun <T : Any> Provider<ConfigProvider>.optionalEntry(serializer: KSerializer<T>, vararg path: String): Provider<T?>
fun <T : Any> ConfigProvider.optionalEntry(serializer: KSerializer<T>, vararg path: String): Provider<T?>

Gets an optional entry Provider for a value deserialized by serializer under path, whose value will be null if the entry does not exist or could not be deserialized due to SerializationException.

The returned provider will only be stored in a WeakReference in the parent provider.


fun <T : Any> Provider<ConfigProvider>.optionalEntry(serializer: KSerializer<T>, vararg paths: List<String>): Provider<T?>

Gets an optional entry Provider for a value deserialized by serializer under the first existing path from paths, whose value will be null if no entry exists or could not be deserialized due to SerializationException.

The returned provider will only be stored in a WeakReference in the parent provider.