Skip to content

Commit

Permalink
Fix flag for catching set
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinMoskala committed Jan 18, 2018
1 parent f7a39e7 commit 05d82d3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import kotlin.reflect.jvm.isAccessible
abstract class PreferenceHolder {

protected inline fun <reified T : Any> bindToPreferenceField(default: T, key: String? = null, catching: Boolean = true): ReadWriteProperty<PreferenceHolder, T>
= bindToPreferenceField(T::class, object : TypeToken<T>() {}.type, default, key)
= bindToPreferenceField(T::class, object : TypeToken<T>() {}.type, default, key, catching)

protected inline fun <reified T : Any> bindToPreferenceFieldNullable(key: String? = null, catching: Boolean = true): ReadWriteProperty<PreferenceHolder, T?>
= bindToPreferenceFieldNullable(T::class, object : TypeToken<T>() {}.type, key)
= bindToPreferenceFieldNullable(T::class, object : TypeToken<T>() {}.type, key, catching)

protected fun <T : Any> bindToPreferenceField(clazz: KClass<T>, type: Type, default: T, key: String?, catching: Boolean = true): ReadWriteProperty<PreferenceHolder, T>
= PreferenceFieldBinder(clazz, type, default, key, catching)
Expand Down

0 comments on commit 05d82d3

Please sign in to comment.