aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/transformers
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-01-22 11:40:47 +0100
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-01-28 22:05:38 +0100
commitc3b911f286186a790be607e9b803e3ed63c77289 (patch)
tree0ede20415d8e03cbd0fbcf7896be7a39caaa3bcc /core/src/main/kotlin/transformers
parent172c7ab00771e3a447ea03c3a81d589eb932c3fb (diff)
downloaddokka-c3b911f286186a790be607e9b803e3ed63c77289.tar.gz
dokka-c3b911f286186a790be607e9b803e3ed63c77289.tar.bz2
dokka-c3b911f286186a790be607e9b803e3ed63c77289.zip
Patch Java analysis
Diffstat (limited to 'core/src/main/kotlin/transformers')
-rw-r--r--core/src/main/kotlin/transformers/psi/DefaultPsiToDocumentationTranslator.kt13
-rw-r--r--core/src/main/kotlin/transformers/psi/PsiToDocumentationTranslator.kt1
2 files changed, 13 insertions, 1 deletions
diff --git a/core/src/main/kotlin/transformers/psi/DefaultPsiToDocumentationTranslator.kt b/core/src/main/kotlin/transformers/psi/DefaultPsiToDocumentationTranslator.kt
index d3ad4526..d8595ad3 100644
--- a/core/src/main/kotlin/transformers/psi/DefaultPsiToDocumentationTranslator.kt
+++ b/core/src/main/kotlin/transformers/psi/DefaultPsiToDocumentationTranslator.kt
@@ -13,12 +13,13 @@ import org.jetbrains.dokka.utilities.DokkaLogger
object DefaultPsiToDocumentationTranslator : PsiToDocumentationTranslator {
override fun invoke(
+ moduleName: String,
psiFiles: List<PsiJavaFile>,
platformData: PlatformData,
context: DokkaContext
): Module {
val docParser = DokkaPsiParser(platformData, context.logger)
- return Module( "JavaModule",
+ return Module(moduleName,
psiFiles.map { psiFile ->
val dri = DRI(packageName = psiFile.packageName)
Package(
@@ -145,6 +146,16 @@ class JavaTypeWrapper(
if (it is PsiClassReferenceType) JavaTypeWrapper(it) else null
}
dri = fromPsi(type)
+ } else if (type is PsiEllipsisType) {
+ constructorFqName = type.canonicalText
+ constructorNamePathSegments = listOf(type.canonicalText) // TODO
+ arguments = emptyList()
+ dri = DRI("java.lang", "Object") // TODO
+ } else if (type is PsiArrayType) {
+ constructorFqName = type.canonicalText
+ constructorNamePathSegments = listOf(type.canonicalText)
+ arguments = emptyList()
+ dri = (type as? PsiClassReferenceType)?.let { fromPsi(it) } // TODO
} else {
type as PsiPrimitiveType
constructorFqName = type.name
diff --git a/core/src/main/kotlin/transformers/psi/PsiToDocumentationTranslator.kt b/core/src/main/kotlin/transformers/psi/PsiToDocumentationTranslator.kt
index 5a1209b1..41290ef8 100644
--- a/core/src/main/kotlin/transformers/psi/PsiToDocumentationTranslator.kt
+++ b/core/src/main/kotlin/transformers/psi/PsiToDocumentationTranslator.kt
@@ -7,6 +7,7 @@ import org.jetbrains.dokka.plugability.DokkaContext
interface PsiToDocumentationTranslator {
fun invoke(
+ moduleName: String,
psiFiles: List<PsiJavaFile>,
platformData: PlatformData,
context: DokkaContext