aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-13 15:52:35 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-13 15:52:35 +0100
commit181418c96f8027a196288a4a6dcd19dc468edf4d (patch)
tree24712a97b0b69d07fa5f39f69ae8407fd043713a
parentacb49b47437b1534b910e23927f8fddca26c69f3 (diff)
downloaddokka-181418c96f8027a196288a4a6dcd19dc468edf4d.tar.gz
dokka-181418c96f8027a196288a4a6dcd19dc468edf4d.tar.bz2
dokka-181418c96f8027a196288a4a6dcd19dc468edf4d.zip
process implements and extends list of Java classes
-rw-r--r--src/Java/JavaDocumentationBuilder.kt2
-rw-r--r--test/data/java/superClass.java4
-rw-r--r--test/src/model/JavaTest.kt12
3 files changed, 18 insertions, 0 deletions
diff --git a/src/Java/JavaDocumentationBuilder.kt b/src/Java/JavaDocumentationBuilder.kt
index 7443db06..1904f621 100644
--- a/src/Java/JavaDocumentationBuilder.kt
+++ b/src/Java/JavaDocumentationBuilder.kt
@@ -55,6 +55,8 @@ public class JavaDocumentationBuilder() {
else -> DocumentationNode.Kind.Class
}
val node = DocumentationNode(this, kind)
+ getExtendsListTypes().forEach { node.appendType(it, Kind.Supertype) }
+ getImplementsListTypes().forEach { node.appendType(it, Kind.Supertype) }
node.appendChildren(getMethods()) { build() }
return node
}
diff --git a/test/data/java/superClass.java b/test/data/java/superClass.java
new file mode 100644
index 00000000..99535813
--- /dev/null
+++ b/test/data/java/superClass.java
@@ -0,0 +1,4 @@
+package test;
+
+public class Foo extends Exception implements Cloneable {
+}
diff --git a/test/src/model/JavaTest.kt b/test/src/model/JavaTest.kt
index 281d51ef..b0e3a133 100644
--- a/test/src/model/JavaTest.kt
+++ b/test/src/model/JavaTest.kt
@@ -42,4 +42,16 @@ public class JavaTest {
}
}
}
+
+ Test fun superClass() {
+ verifyModel("test/data/java/superClass.java") { model ->
+ val pkg = model.members.single()
+ with(pkg.members.single()) {
+ val superTypes = details(DocumentationNode.Kind.Supertype)
+ assertEquals(2, superTypes.size())
+ assertEquals("Exception", superTypes[0].name)
+ assertEquals("Cloneable", superTypes[1].name)
+ }
+ }
+ }
}