diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2021-04-06 18:06:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-06 18:06:42 +0200 |
commit | 5afe512c669e68aea3712ac37b67d005657cf60a (patch) | |
tree | 2a2ec579a16bf32b93dbcd1adaa8961c2c875b59 /plugins/base/src/main/kotlin/transformers | |
parent | cd071a5e07c8202c66db2e077ea43bea76d55511 (diff) | |
download | dokka-5afe512c669e68aea3712ac37b67d005657cf60a.tar.gz dokka-5afe512c669e68aea3712ac37b67d005657cf60a.tar.bz2 dokka-5afe512c669e68aea3712ac37b67d005657cf60a.zip |
Suppress inherited members (#1814)
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers')
-rw-r--r-- | plugins/base/src/main/kotlin/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt b/plugins/base/src/main/kotlin/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt new file mode 100644 index 00000000..a1b5052d --- /dev/null +++ b/plugins/base/src/main/kotlin/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt @@ -0,0 +1,13 @@ +package org.jetbrains.dokka.base.transformers.documentables + +import org.jetbrains.dokka.model.* +import org.jetbrains.dokka.model.properties.WithExtraProperties +import org.jetbrains.dokka.plugability.DokkaContext + +class InheritedEntriesDocumentableFilterTransformer(context: DokkaContext) : + SuppressedByConditionDocumentableFilterTransformer(context) { + override fun shouldBeSuppressed(d: Documentable): Boolean = + context.configuration.suppressInheritedMembers && (d as? WithExtraProperties<Documentable>)?.extra?.get( + InheritedMember + )?.inheritedFrom?.any { entry -> entry.value != null } ?: false +}
\ No newline at end of file |