From 9559158bfeeb274e9ccf1b4563f1b23b42afc493 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Wed, 5 Jul 2023 10:04:55 +0200 Subject: Decompose Kotlin/Java analysis (#3034) * Extract analysis into separate modules --- core/src/main/kotlin/model/Documentable.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'core/src/main/kotlin/model/Documentable.kt') diff --git a/core/src/main/kotlin/model/Documentable.kt b/core/src/main/kotlin/model/Documentable.kt index c7b2290e..64c3e14c 100644 --- a/core/src/main/kotlin/model/Documentable.kt +++ b/core/src/main/kotlin/model/Documentable.kt @@ -518,6 +518,15 @@ fun SourceSetDependent?.orEmpty(): SourceSetDependent = this ?: emptyM interface DocumentableSource { val path: String + + /** + * Computes the first line number of the documentable's declaration/signature/identifier. + * + * Numbering is always 1-based. + * + * May return null if the sources could not be found - for example, for synthetic/generated declarations. + */ + fun computeLineNumber(): Int? } -data class TypeConstructorWithKind(val typeConstructor: TypeConstructor, val kind: ClassKind) \ No newline at end of file +data class TypeConstructorWithKind(val typeConstructor: TypeConstructor, val kind: ClassKind) -- cgit