aboutsummaryrefslogtreecommitdiff
path: root/src/Model
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-20 17:12:57 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-20 17:12:57 +0100
commit6620764c5f18c87933369131602b24bd2fa490e8 (patch)
treedd7045487ac5fabe78574a4b41eb49cc2e58f395 /src/Model
parentbfe53b9ea3359baee1785c2f6291bb5408597e28 (diff)
downloaddokka-6620764c5f18c87933369131602b24bd2fa490e8.tar.gz
dokka-6620764c5f18c87933369131602b24bd2fa490e8.tar.bz2
dokka-6620764c5f18c87933369131602b24bd2fa490e8.zip
pending references logic moved from DocumentationBuilder to model
Diffstat (limited to 'src/Model')
-rw-r--r--src/Model/DocumentationReference.kt13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Model/DocumentationReference.kt b/src/Model/DocumentationReference.kt
index d7ad5f9e..4bc819f6 100644
--- a/src/Model/DocumentationReference.kt
+++ b/src/Model/DocumentationReference.kt
@@ -15,5 +15,14 @@ public data class DocumentationReference(val from: DocumentationNode, val to: Do
}
}
-
-
+class PendingDocumentationReference(val lazyNodeFrom: () -> DocumentationNode?,
+ val lazyNodeTo: () -> DocumentationNode?,
+ val kind: DocumentationReference.Kind) {
+ fun resolve() {
+ val fromNode = lazyNodeFrom()
+ val toNode = lazyNodeTo()
+ if (fromNode != null && toNode != null) {
+ fromNode.addReferenceTo(toNode, kind)
+ }
+ }
+}