Reputation: 73385
e.g. this WebSettings Java class.
It has a Java method setJavaScriptEnabled(boolean)
that turns into a Kotlin property javaScriptEnabled
as below, but there is also setSupportZoom(boolean)
that does not turn into a Kotlin property supportZoom
.
settings.javaScriptEnabled = true
settings.domStorageEnabled = true
settings.setSupportZoom(false)
settings.builtInZoomControls = false
settings.setSupportMultipleWindows(true)
Upvotes: 1
Views: 103
Reputation: 47259
From the documentation:
Boolean
accessor methods (where the name of the getter starts withis
and the name of the setter starts withset
) are represented as properties which have the same name as the getter method.
And still as of Kotlin 1.2.0:
Note that, if the Java class only has a setter, it will not be visible as a property in Kotlin, because Kotlin does not support set-only properties at this time.
There is no method in the Java class of signature boolean isSupportMultipleWindows()
and boolean supportMultipleWindows()
does not match the property representation in Kotlin.
Upvotes: 3