[Analysis API] rename KtAnnotationsList.containsAnnotation -> hasAnnotation

This commit is contained in:
Ilya Kirillov
2022-09-13 18:18:03 +02:00
parent 1bdde25dc7
commit 7d47651353
6 changed files with 12 additions and 12 deletions
@@ -23,12 +23,12 @@ public val KtAnnotated.annotations: List<KtAnnotationApplication>
get() = annotationsList.annotations
/**
* Checks if entity contains annotation with specified [classId].
* Checks if entity has annotation with specified [classId].
*
* @see [KtAnnotationsList.containsAnnotation]
* @see [KtAnnotationsList.hasAnnotation]
*/
public fun KtAnnotated.containsAnnotation(classId: ClassId): Boolean =
annotationsList.containsAnnotation(classId)
public fun KtAnnotated.hasAnnotation(classId: ClassId): Boolean =
annotationsList.hasAnnotation(classId)
/**
* A list of annotations applied with specified [classId].
@@ -17,7 +17,7 @@ public abstract class KtAnnotationsList : KtLifetimeOwner {
/**
* A list of annotations applied.
*
* To check if annotation is present, please use [containsAnnotation].
* To check if annotation is present, please use [hasAnnotation].
*
* @see KtAnnotationApplication
*/
@@ -31,12 +31,12 @@ public abstract class KtAnnotationsList : KtLifetimeOwner {
* annotationsList.containsAnnotation(classId) == annotationsList.annotations.any { it.classId == classId }
* ```
*/
public abstract fun containsAnnotation(classId: ClassId): Boolean
public abstract fun hasAnnotation(classId: ClassId): Boolean
/**
* A list of annotations applied with specified [classId].
*
* To check if annotation is present, please use [containsAnnotation].
* To check if annotation is present, please use [hasAnnotation].
*
* The semantic is equivalent to
* ```
@@ -50,7 +50,7 @@ public abstract class KtAnnotationsList : KtLifetimeOwner {
/**
* A list of annotations [ClassId].
*
* To check if annotation is present, please use [containsAnnotation].
* To check if annotation is present, please use [hasAnnotation].
*
* The semantic is equivalent to
* ```