public interface PsiAnnotation extends PsiAnnotationMemberValue, JvmAnnotation
Modifier and Type | Interface and Description |
---|---|
static class |
PsiAnnotation.TargetType
Kinds of element to which an annotation type is applicable (see
ElementType ). |
Iconable.IconFlags, Iconable.LastComputedIcon
Modifier and Type | Field and Description |
---|---|
static ArrayFactory<PsiAnnotation> |
ARRAY_FACTORY |
static java.lang.String |
DEFAULT_REFERENCED_METHOD_NAME |
static PsiAnnotation[] |
EMPTY_ARRAY
The empty array of PSI annotations which can be reused to avoid unnecessary allocations.
|
ICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
Modifier and Type | Method and Description |
---|---|
PsiAnnotationMemberValue |
findAttributeValue(java.lang.String attributeName)
Returns the value of the annotation element with the specified name.
|
PsiAnnotationMemberValue |
findDeclaredAttributeValue(java.lang.String attributeName)
Returns the value of the annotation element with the specified name.
|
default java.util.List<JvmAnnotationAttribute> |
getAttributes() |
default PsiMetaData |
getMetaData()
Deprecated.
don't use or override; it's temporarily left for compatibility with older plugins
|
PsiJavaCodeReferenceElement |
getNameReferenceElement()
Returns the reference element representing the name of the annotation.
|
PsiAnnotationOwner |
getOwner()
Returns an owner of the annotation - usually a parent, but for type annotations the owner might be a type element.
|
PsiAnnotationParameterList |
getParameterList()
Returns the list of parameters for the annotation.
|
java.lang.String |
getQualifiedName()
Returns the fully qualified name of the annotation class.
|
default boolean |
hasQualifiedName(java.lang.String qualifiedName) |
<T extends PsiAnnotationMemberValue> |
setDeclaredAttributeValue(java.lang.String attributeName,
T value)
Set annotation attribute value.
|
accept, acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getCopyableUserData, getFirstChild, getLanguage, getLastChild, getManager, getNavigationElement, getNextSibling, getNode, getOriginalElement, getOwnReferences, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, getTextRangeInParent, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray, toString
getUserData, putUserData
findAttribute, hasAttribute
static final PsiAnnotation[] EMPTY_ARRAY
static final ArrayFactory<PsiAnnotation> ARRAY_FACTORY
static final java.lang.String DEFAULT_REFERENCED_METHOD_NAME
PsiAnnotationParameterList getParameterList()
java.lang.String getQualifiedName()
getQualifiedName
in interface JvmAnnotation
PsiJavaCodeReferenceElement getNameReferenceElement()
PsiAnnotationMemberValue findAttributeValue(java.lang.String attributeName)
attributeName
- name of the annotation element for which the value is requested. If it isn't defined in annotation,
the default value is returned.PsiAnnotationMemberValue findDeclaredAttributeValue(java.lang.String attributeName)
attributeName
- name of the annotation element for which the value is requested, declared in this annotation.<T extends PsiAnnotationMemberValue> T setDeclaredAttributeValue(java.lang.String attributeName, T value)
attributeName
- attribute namevalue
- new value template elementPsiAnnotationOwner getOwner()
default java.util.List<JvmAnnotationAttribute> getAttributes()
getAttributes
in interface JvmAnnotation
default boolean hasQualifiedName(java.lang.String qualifiedName)
@Deprecated default PsiMetaData getMetaData()