Skip to content

Instantly share code, notes, and snippets.

@yenerm
Last active November 9, 2020 21:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save yenerm/e0b4fe38d91f6b3f4cbcc5e95ee905fb to your computer and use it in GitHub Desktop.
<!-- Copyright 2020 Google LLC.
SPDX-License-Identifier: Apache-2.0 -->
public override fun setValue(thisRef: Any?, property: KProperty<*>, value: T) {
val oldValue = this.value
if (!beforeChange(property, oldValue, value)) {
return
}
this.value = value
afterChange(property, oldValue, value)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment