[Analysis API] rename KtAnnotationsList.containsAnnotation -> hasAnnotation
This commit is contained in:
+4
-4
@@ -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].
|
||||
|
||||
+4
-4
@@ -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
|
||||
* ```
|
||||
|
||||
Reference in New Issue
Block a user