-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Public Java property is shown as val
#2539
Labels
Comments
Yeah, turns out it's not as easy to fix :( Adding this will solve it for java classes private fun DProperty.isMutable(sourceSet: DokkaSourceSet): Boolean {
return when(this.documentableLanguage(sourceSet)) {
DocumentableLanguage.KOTLIN -> this.setter != null
DocumentableLanguage.JAVA -> {
// java properties without getters and setters should be `var`
if (this.getter == null && this.setter == null) true else this.setter != null
}
}
}
if (p.isMutable(sourceSet)) keyword("var ") else keyword("val ") But We would need a way to see from which language this property came from, and if it came from Java - apply this special rule This information is available in descriptors, so we'd have to pass it somehow, so not as difficult |
IgnatBeresnev
added a commit
that referenced
this issue
Jun 16, 2022
IgnatBeresnev
added a commit
that referenced
this issue
Jun 16, 2022
IgnatBeresnev
added a commit
that referenced
this issue
Jun 17, 2022
IgnatBeresnev
added a commit
that referenced
this issue
Jun 19, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For public properties without getter or setter Dokka shows keyword
val
instead ofvar
Installation
The text was updated successfully, but these errors were encountered: