Property without getter in Kotlin -


how can declare property custom setter, without getter in kotlin? in anko example this:

var myproperty: type     @deprecated(ankointernals.no_getter, level = deprecationlevel.error)      get() = ankointernals.nogetter()     set(value) { field = value; /* setter logic */ } 

but looks bit hacky me. right way so? if yes, case when project doesn't have anko dependency?

p.s. let me clear - want have no getter @ all, rather private getter

deprecating setter still way effect.

you don't need anko dependency, use @deprecated annotation appropriate level.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -