W3cubDocs

/Kotlin

Accessor

Platform and version requirements: JVM (1.0), JS (1.1)
interface Accessor<out R>

Represents a property accessor, which is a get or set method declared alongside the property. See the Kotlin language documentation for more information.

Parameters

R - the type of the property, which it is an accessor of.

Properties

Platform and version requirements: JVM (1.0), JS (1.0)

property

The property which this accessor is originated from.

abstract val property: KProperty<R>

Inheritors

Platform and version requirements: JVM (1.0), JS (1.0)

Getter

Getter of the property is a get method declared alongside the property.

interface Getter<out R> : Accessor<R>, KFunction<R>
Platform and version requirements: JVM (1.0), JS (1.0)

Setter

Setter of the property is a set method declared alongside the property.

interface Setter<R> : Accessor<R>, KFunction<Unit>

© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-property/-accessor/index.html