Skip to content

Instantly share code, notes, and snippets.

@elect86
Last active November 10, 2017 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elect86/1cf30b62eac3839c998f4d58cffd3a17 to your computer and use it in GitHub Desktop.
Save elect86/1cf30b62eac3839c998f4d58cffd3a17 to your computer and use it in GitHub Desktop.
class JavaProp<T>(val g: () -> T, val s: (T) -> T) : KMutableProperty0<T> {
override val isConst: Boolean = false
override val isOpen: Boolean = false
override val annotations: List<Annotation> = listOf()
override val isLateinit: Boolean = false
override val isAbstract: Boolean = false
override val isFinal: Boolean = false
override val name: String = ""
override val parameters: List<KParameter> = listOf()
override val returnType: KType = TODO()
override val typeParameters: List<KTypeParameter> = listOf()
override val getter: KProperty0.Getter<T> = TODO()
override val setter: KMutableProperty0.Setter<T> = TODO()
override val visibility: KVisibility? = null
override fun invoke(): T {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
override fun set(value: T) {
s(value)
}
override fun get(): T {
return g()
}
override fun call(vararg args: Any?): T {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
override fun callBy(args: Map<KParameter, Any?>): T {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
override fun getDelegate(): Any? {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment