What is the recommended way to get the visibility ...
# ksp
j
What is the recommended way to get the visibility of a KSPropertySetter?
t
I'd try to get the visibility of the corresponding property by
KSDeclaration.getVisibility()
, and then narrow it by the setter's modifier (private)
j
It would be nice if there was a built in method to get that info
j
there are util functions for checking the overall visibility of
KSDeclaration
, problem is that they are not available for property accessors since they are not
KSDeclaration
, I think it is reasonable to expand these util functions to property accessors,
you can still do it by checking the receiver visibility, receiver are available in all accessors.
j
yeah but the setter can be different than the receiver