public interface PsiAnnotationOwner
Modifier and Type | Method and Description |
---|---|
PsiAnnotation |
addAnnotation(java.lang.String qualifiedName)
Adds a new annotation to this owner.
|
PsiAnnotation |
findAnnotation(java.lang.String qualifiedName)
Searches the owner for an annotation with the specified fully qualified name
and returns one if it is found.
|
PsiAnnotation [] |
getAnnotations()
Returns the list of annotations syntactically contained in the element.
|
PsiAnnotation [] |
getApplicableAnnotations() |
default boolean |
hasAnnotation(java.lang.String qualifiedName)
Searches the owner for an annotation with the specified fully qualified name
and returns
true if it is found. |
PsiAnnotation [] getAnnotations()
PsiAnnotation [] getApplicableAnnotations()
PsiAnnotation findAnnotation(java.lang.String qualifiedName)
qualifiedName
- the fully qualified name of the annotation to find.default boolean hasAnnotation(java.lang.String qualifiedName)
true
if it is found.
This method is preferable over findAnnotation(java.lang.String)
since implementations are free not to instantiate the PsiAnnotation
.qualifiedName
- the fully qualified name of the annotation to findtrue
is such annotation is found, otherwise false
PsiAnnotation addAnnotation(java.lang.String qualifiedName)
qualifiedName
- qualifiedName