[AA] KtAnnotated: split hasAnnotation to two extensions

This commit is contained in:
Dmitrii Gridin
2023-01-06 16:19:44 +01:00
committed by Space Team
parent 2c305b46df
commit 5a74fec3ac
11 changed files with 90 additions and 44 deletions
@@ -45,13 +45,15 @@ internal class KtFe10AnnotationsList private constructor(
}
}
override fun hasAnnotation(classId: ClassId): Boolean = withValidityAssertion {
fe10Annotations.hasAnnotation(classId.asSingleFqName())
}
override fun hasAnnotation(
classId: ClassId,
useSiteTarget: AnnotationUseSiteTarget?,
strictUseSite: Boolean,
): Boolean = withValidityAssertion {
fe10Annotations.hasAnnotation(classId.asSingleFqName())
}
acceptAnnotationsWithoutUseSite: Boolean,
): Boolean = hasAnnotation(classId)
override fun annotationsByClassId(classId: ClassId): List<KtAnnotationApplication> = withValidityAssertion {
if (classId in annotationsToIgnore) return@withValidityAssertion emptyList()