Delete remains of external annotations support from compiler

This commit is contained in:
Dmitry Jemerov
2018-03-28 11:54:57 +02:00
parent 9349b9bc67
commit 20cd193030
10 changed files with 12 additions and 104 deletions
@@ -30,8 +30,6 @@ interface Annotations : Iterable<AnnotationDescriptor> {
fun hasAnnotation(fqName: FqName): Boolean = findAnnotation(fqName) != null
fun findExternalAnnotation(fqName: FqName): AnnotationDescriptor? = null
fun getUseSiteTargetedAnnotations(): List<AnnotationWithTarget>
// Returns both targeted and annotations without target. Annotation order is preserved.
@@ -81,10 +79,6 @@ class FilteredAnnotations(
if (fqNameFilter(fqName)) delegate.findAnnotation(fqName)
else null
override fun findExternalAnnotation(fqName: FqName) =
if (fqNameFilter(fqName)) delegate.findExternalAnnotation(fqName)
else null
override fun getUseSiteTargetedAnnotations(): List<AnnotationWithTarget> {
return delegate.getUseSiteTargetedAnnotations().filter { shouldBeReturned(it.annotation) }
}
@@ -114,8 +108,6 @@ class CompositeAnnotations(
override fun findAnnotation(fqName: FqName) = delegates.asSequence().mapNotNull { it.findAnnotation(fqName) }.firstOrNull()
override fun findExternalAnnotation(fqName: FqName) = delegates.asSequence().mapNotNull { it.findExternalAnnotation(fqName) }.firstOrNull()
override fun getUseSiteTargetedAnnotations() = delegates.flatMap { it.getUseSiteTargetedAnnotations() }
override fun getAllAnnotations() = delegates.flatMap { it.getAllAnnotations() }