Drop Annotations.getAllAnnotations

This commit is contained in:
Alexander Udalov
2018-08-16 12:18:36 +02:00
parent 83fbabd628
commit 87c0d56618
22 changed files with 51 additions and 109 deletions
@@ -33,8 +33,6 @@ open class DeserializedAnnotations(
override fun getUseSiteTargetedAnnotations(): List<AnnotationWithTarget> = emptyList()
override fun getAllAnnotations(): List<AnnotationWithTarget> = annotations.map { AnnotationWithTarget(it, null) }
override fun iterator(): Iterator<AnnotationDescriptor> = annotations.iterator()
}
@@ -58,8 +56,6 @@ open class DeserializedAnnotationsWithPossibleTargets(
override fun getUseSiteTargetedAnnotations(): List<AnnotationWithTarget> = annotations.filter { it.target != null }
override fun getAllAnnotations(): List<AnnotationWithTarget> = annotations
override fun iterator(): Iterator<AnnotationDescriptor> {
return annotations.asSequence().filter { it.target == null }.map { it.annotation }.iterator()
}