Pass reader as param
This commit is contained in:
+3
-3
@@ -20,7 +20,7 @@ import java.io.File
|
|||||||
import java.io.Reader
|
import java.io.Reader
|
||||||
import java.io.StringReader
|
import java.io.StringReader
|
||||||
|
|
||||||
class KotlinAnnotationProvider(private val annotationsReader: Reader) {
|
class KotlinAnnotationProvider(annotationsReader: Reader) {
|
||||||
|
|
||||||
private companion object {
|
private companion object {
|
||||||
const val ANNOTATED_CLASS = "c"
|
const val ANNOTATED_CLASS = "c"
|
||||||
@@ -40,7 +40,7 @@ class KotlinAnnotationProvider(private val annotationsReader: Reader) {
|
|||||||
private val annotatedKotlinElementsInternal = hashMapOf<String, MutableSet<AnnotatedElementDescriptor>>()
|
private val annotatedKotlinElementsInternal = hashMapOf<String, MutableSet<AnnotatedElementDescriptor>>()
|
||||||
|
|
||||||
init {
|
init {
|
||||||
readAnnotations()
|
readAnnotations(annotationsReader)
|
||||||
}
|
}
|
||||||
|
|
||||||
val annotatedKotlinElements: Map<String, Set<AnnotatedElementDescriptor>>
|
val annotatedKotlinElements: Map<String, Set<AnnotatedElementDescriptor>>
|
||||||
@@ -52,7 +52,7 @@ class KotlinAnnotationProvider(private val annotationsReader: Reader) {
|
|||||||
val supportInheritedAnnotations: Boolean
|
val supportInheritedAnnotations: Boolean
|
||||||
get() = kotlinClassesInternal.isNotEmpty()
|
get() = kotlinClassesInternal.isNotEmpty()
|
||||||
|
|
||||||
private fun readAnnotations() {
|
private fun readAnnotations(annotationsReader: Reader) {
|
||||||
fun handleShortenedName(cache: MutableMap<String, String>, lineParts: List<String>) {
|
fun handleShortenedName(cache: MutableMap<String, String>, lineParts: List<String>) {
|
||||||
val name = lineParts[1]
|
val name = lineParts[1]
|
||||||
val id = lineParts[2]
|
val id = lineParts[2]
|
||||||
|
|||||||
Reference in New Issue
Block a user