aboutsummaryrefslogtreecommitdiff
path: root/plugins/base
diff options
context:
space:
mode:
authorBłażej Kardyś <bkardys@virtuslab.com>2020-03-20 03:32:19 +0100
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-03-20 09:35:56 +0100
commit36926eb866166d3751372322bfb4ed4471471f44 (patch)
tree1976f6fee68eb31b06eb2c7a1b4c81204568509a /plugins/base
parent7201bcfca3b426d741c10d4c05201cb03e9f5d3c (diff)
downloaddokka-36926eb866166d3751372322bfb4ed4471471f44.tar.gz
dokka-36926eb866166d3751372322bfb4ed4471471f44.tar.bz2
dokka-36926eb866166d3751372322bfb4ed4471471f44.zip
Adding missing extra modifiers for java functions
Diffstat (limited to 'plugins/base')
-rw-r--r--plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt20
1 files changed, 17 insertions, 3 deletions
diff --git a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
index 35bbd05e..c6e3177b 100644
--- a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
@@ -244,12 +244,26 @@ object DefaultPsiToDocumentableTranslator : PsiToDocumentableTranslator {
null,
psi.getModifier(),
listOf(platformData),
- PropertyContainer.empty<DFunction>()
- + InheritedFunction(isInherited)
- + psi.annotations.toList().toExtra()
+ PropertyContainer.withAll(
+ InheritedFunction(isInherited),
+ psi.annotations.toList().toExtra(),
+ psi.additionalExtras()
+ )
)
}
+ private fun PsiMethod.additionalExtras() = AdditionalModifiers(
+ listOfNotNull(
+ ExtraModifiers.STATIC.takeIf { hasModifier(JvmModifier.STATIC) },
+ ExtraModifiers.NATIVE.takeIf { hasModifier(JvmModifier.NATIVE) },
+ ExtraModifiers.SYNCHRONIZED.takeIf { hasModifier(JvmModifier.SYNCHRONIZED) },
+ ExtraModifiers.STRICTFP.takeIf { hasModifier(JvmModifier.STRICTFP) },
+ ExtraModifiers.TRANSIENT.takeIf { hasModifier(JvmModifier.TRANSIENT) },
+ ExtraModifiers.VOLATILE.takeIf { hasModifier(JvmModifier.VOLATILE) },
+ ExtraModifiers.TRANSITIVE.takeIf { hasModifier(JvmModifier.TRANSITIVE) }
+ ).toSet()
+ )
+
private fun getBound(type: PsiType): Bound =
cachedBounds.getOrPut(type.canonicalText) {
when (type) {