aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/main/kotlin')
-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) {