aboutsummaryrefslogtreecommitdiff
path: root/src/Model/DocumentationBuildingVisitor.kt
diff options
context:
space:
mode:
authorIlya Ryzhenkov <orangy@jetbrains.com>2014-07-16 00:11:04 +0400
committerIlya Ryzhenkov <orangy@jetbrains.com>2014-07-16 00:11:04 +0400
commitd25b896ec692aeb35a5465b624508851c96dfd1d (patch)
treec68abcd1c00c06afd6f364275169ef8356f1d02f /src/Model/DocumentationBuildingVisitor.kt
parent62177099390dccf4fba3facb668415b8633e6e24 (diff)
downloaddokka-d25b896ec692aeb35a5465b624508851c96dfd1d.tar.gz
dokka-d25b896ec692aeb35a5465b624508851c96dfd1d.tar.bz2
dokka-d25b896ec692aeb35a5465b624508851c96dfd1d.zip
Add DocumentationOptions to support non-public API docs (used in tests)
Diffstat (limited to 'src/Model/DocumentationBuildingVisitor.kt')
-rw-r--r--src/Model/DocumentationBuildingVisitor.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Model/DocumentationBuildingVisitor.kt b/src/Model/DocumentationBuildingVisitor.kt
index 2d293de2..b544b42b 100644
--- a/src/Model/DocumentationBuildingVisitor.kt
+++ b/src/Model/DocumentationBuildingVisitor.kt
@@ -4,7 +4,10 @@ import org.jetbrains.jet.lang.descriptors.*
import org.jetbrains.jet.lang.resolve.name.*
import org.jetbrains.jet.lang.resolve.*
-class DocumentationBuildingVisitor(val context: BindingContext, private val worker: DeclarationDescriptorVisitor<DocumentationNode, DocumentationNode>)
+public data class DocumentationOptions(val includeNonPublic : Boolean = false)
+class DocumentationBuildingVisitor(val context: BindingContext,
+ val options: DocumentationOptions,
+ private val worker: DeclarationDescriptorVisitor<DocumentationNode, DocumentationNode>)
: DeclarationDescriptorVisitor<DocumentationNode, DocumentationNode> {
private fun visitChildren(descriptors: Collection<DeclarationDescriptor>, data: DocumentationNode) {
@@ -15,7 +18,7 @@ class DocumentationBuildingVisitor(val context: BindingContext, private val work
private fun visitChild(descriptor: DeclarationDescriptor?, data: DocumentationNode) {
if (descriptor != null && descriptor.isUserCode()) {
- if (descriptor !is MemberDescriptor || descriptor.getVisibility().isPublicAPI()) {
+ if (options.includeNonPublic || descriptor !is MemberDescriptor || descriptor.getVisibility().isPublicAPI()) {
descriptor.accept(this, data)
}
}