public class PsiAnnotationImpl extends JavaStubPsiElement<PsiAnnotationStub> implements PsiAnnotation
PsiAnnotation.TargetType
Iconable.IconFlags, Iconable.LastComputedIcon
CREATION_TRACE, ourTraceStubAstBinding
FLAGS_LOCKED, ICON_PLACEHOLDER
ARRAY_FACTORY, DEFAULT_REFERENCED_METHOD_NAME, EMPTY_ARRAY
ICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
EMPTY_NAVIGATABLE_ELEMENT_ARRAY
EMPTY_NAVIGATION_ITEM_ARRAY
Constructor and Description |
---|
PsiAnnotationImpl(ASTNode node) |
PsiAnnotationImpl(PsiAnnotationStub stub) |
Modifier and Type | Method and Description |
---|---|
void |
accept(PsiElementVisitor visitor)
Passes the element to the specified visitor.
|
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.
|
static java.lang.String |
getAnnotationShortName(java.lang.String annoText) |
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.
|
boolean |
hasQualifiedName(java.lang.String qualifiedName) |
<T extends PsiAnnotationMemberValue> |
setDeclaredAttributeValue(java.lang.String attributeName,
T value)
Set annotation attribute value.
|
java.lang.String |
toString()
toString() should never be presented to the user.
|
acceptChildren, add, addAfter, addBefore, calcTreeElement, checkAdd, clone, cloneImpl, delete, deleteChildRange, getChildren, getLanguage, getTextOffset, replace
getContainingFile, getContext, getElementType, getGreenStub, getManager, getNode, getParent, getParentByStub, getParentByTree, getProject, getRequiredStubOrPsiChild, getStub, getStubOrPsiChild, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiParentOfType, isPhysical, isValid, isWritable, setNode, setSubstrateRef
addInternal, addRange, addRangeAfter, addRangeBefore, checkDelete, copy, deleteChildInternal, findChildByFilter, findChildByType, findChildByType, findChildrenByType, findChildrenByType, findChildrenByType, findChildrenByType, findElementAt, findLastChildByType, findNotNullChildByType, findNotNullChildByType, getCopyableUserData, getFirstChild, getLastChild, getNextSibling, getPrevSibling, getStartOffsetInParent, getText, getTextLength, getTextRange, putCopyableUserData, replaceChildInternal, subtreeChanged, textContains, textMatches, textToCharArray
canNavigate, canNavigateToSource, findChildByClass, findChildrenByClass, findNotNullChildByClass, findReferenceAt, getName, getNavigationElement, getOriginalElement, getPresentation, getReference, getReferences, getResolveScope, getUseScope, isEquivalentTo, navigate, notNullChild, processDeclarations, textMatches
buildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getElementIcon, getIcon, iconWithVisibilityIfNeeded, isNativeFileType, isVisibilitySupported, overlayIcons, registerIconLayer, transformFlags
changeUserMap, clearUserData, copyCopyableDataTo, copyUserDataTo, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putUserData, putUserDataIfAbsent, replace, setUserMap
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAttributes, getMetaData
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
getUserData, putUserData
findAttribute, hasAttribute
getElementType, getStub
public PsiAnnotationImpl(PsiAnnotationStub stub)
public PsiAnnotationImpl(ASTNode node)
public PsiJavaCodeReferenceElement getNameReferenceElement()
PsiAnnotation
getNameReferenceElement
in interface PsiAnnotation
public PsiAnnotationMemberValue findAttributeValue(java.lang.String attributeName)
PsiAnnotation
findAttributeValue
in interface PsiAnnotation
attributeName
- name of the annotation element for which the value is requested. If it isn't defined in annotation,
the default value is returned.public PsiAnnotationMemberValue findDeclaredAttributeValue(java.lang.String attributeName)
PsiAnnotation
findDeclaredAttributeValue
in interface PsiAnnotation
attributeName
- name of the annotation element for which the value is requested, declared in this annotation.public <T extends PsiAnnotationMemberValue> T setDeclaredAttributeValue(java.lang.String attributeName, T value)
PsiAnnotation
setDeclaredAttributeValue
in interface PsiAnnotation
attributeName
- attribute namevalue
- new value template elementpublic java.lang.String toString()
PsiElement
toString
in interface PsiElement
toString
in class java.lang.Object
public PsiAnnotationParameterList getParameterList()
PsiAnnotation
getParameterList
in interface PsiAnnotation
public java.lang.String getQualifiedName()
PsiAnnotation
getQualifiedName
in interface JvmAnnotation
getQualifiedName
in interface PsiAnnotation
public boolean hasQualifiedName(java.lang.String qualifiedName)
hasQualifiedName
in interface PsiAnnotation
public final void accept(PsiElementVisitor visitor)
PsiElement
accept
in interface PsiElement
accept
in class PsiElementBase
visitor
- the visitor to pass the element to.public PsiAnnotationOwner getOwner()
PsiAnnotation
getOwner
in interface PsiAnnotation
public static java.lang.String getAnnotationShortName(java.lang.String annoText)