public class LightFieldBuilder extends LightVariableBuilder<LightFieldBuilder> implements PsiField
Iconable.IconFlags, Iconable.LastComputedIcon
myManager
FLAGS_LOCKED, ICON_PLACEHOLDER
ARRAY_FACTORY, EMPTY_ARRAY
EMPTY_NAVIGATABLE_ELEMENT_ARRAY
ICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
EMPTY_NAVIGATION_ITEM_ARRAY
Constructor and Description |
---|
LightFieldBuilder(PsiManager manager,
java.lang.String name,
PsiType type) |
LightFieldBuilder(java.lang.String name,
PsiType type,
PsiElement navigationElement) |
LightFieldBuilder(java.lang.String name,
java.lang.String type,
PsiElement navigationElement) |
Modifier and Type | Method and Description |
---|---|
PsiClass |
getContainingClass()
Returns the class containing the member.
|
PsiDocComment |
getDocComment()
Returns the JavaDoc comment for the element, or
null when the element has no JavaDoc comment. |
PsiExpression |
getInitializer()
Returns the initializer for the variable.
|
PsiElement |
getParent()
Returns the parent of the PSI element.
|
boolean |
isDeprecated()
Returns
true if the element is marked as deprecated via an annotation or a JavaDoc tag. |
boolean |
isEquivalentTo(PsiElement another)
This method shouldn't be called by clients directly, because there are no guarantees of it being symmetric.
|
LightFieldBuilder |
setContainingClass(PsiClass psiClass) |
LightFieldBuilder |
setDocComment(PsiDocComment docComment) |
void |
setInitializer(PsiExpression initializer)
Adds initializer to the field declaration or, if
initializer parameter is null,
removes the initializer from the field declaration. |
LightFieldBuilder |
setIsDeprecated(boolean isDeprecated) |
computeConstantValue, getElementIcon, getModifierList, getName, getNameIdentifier, getOriginInfo, getType, getTypeElement, hasInitializer, hasModifierProperty, isVisibilitySupported, normalizeDeclaration, setBaseIcon, setModifierList, setModifiers, setName, setOriginInfo, toString
accept, add, addAfter, addBefore, checkAdd, checkDelete, copy, delete, findElementAt, getChildren, getContainingFile, getLanguage, getManager, getNavigationElement, getNextSibling, getNode, getPrevSibling, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, isPhysical, isValid, isWritable, replace, setNavigationElement, textMatches, textMatches, textToCharArray
acceptChildren, addRange, addRangeAfter, addRangeBefore, canNavigate, canNavigateToSource, deleteChildRange, findChildByClass, findChildrenByClass, findNotNullChildByClass, findReferenceAt, getContext, getFirstChild, getLastChild, getOriginalElement, getPresentation, getProject, getReference, getReferences, getResolveScope, getUseScope, navigate, notNullChild, processDeclarations, textContains
buildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getIcon, iconWithVisibilityIfNeeded, isNativeFileType, overlayIcons, registerIconLayer, transformFlags
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName, getNameIdentifier, getType
getAnnotation, getAnnotations, getSourceElement, hasAnnotation, hasModifier
computeConstantValue, getTypeElement, hasInitializer, normalizeDeclaration, setName
getIdentifyingElement
getNavigationElement
isWritable
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, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, getTextRangeInParent, getUseScope, isPhysical, isValid, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray, toString
getUserData, putUserData
getPresentation
canNavigate, canNavigateToSource, navigate
public LightFieldBuilder(java.lang.String name, java.lang.String type, PsiElement navigationElement)
public LightFieldBuilder(java.lang.String name, PsiType type, PsiElement navigationElement)
public LightFieldBuilder(PsiManager manager, java.lang.String name, PsiType type)
public LightFieldBuilder setContainingClass(PsiClass psiClass)
public void setInitializer(PsiExpression initializer) throws IncorrectOperationException
PsiField
initializer
parameter is null,
removes the initializer from the field declaration.setInitializer
in interface PsiField
setInitializer
in interface PsiVariable
initializer
- the initializer to add.IncorrectOperationException
- if the modifications fails for some reason.public PsiExpression getInitializer()
PsiVariable
getInitializer
in interface PsiVariable
getInitializer
in class LightVariableBuilder<LightFieldBuilder>
PsiVariable.hasInitializer()
public PsiDocComment getDocComment()
PsiJavaDocumentedElement
null
when the element has no JavaDoc comment.getDocComment
in interface PsiJavaDocumentedElement
public LightFieldBuilder setDocComment(PsiDocComment docComment)
public boolean isDeprecated()
PsiDocCommentOwner
true
if the element is marked as deprecated via an annotation or a JavaDoc tag.isDeprecated
in interface PsiDocCommentOwner
public LightFieldBuilder setIsDeprecated(boolean isDeprecated)
public PsiClass getContainingClass()
PsiMember
getContainingClass
in interface JvmMember
getContainingClass
in interface PsiJvmMember
getContainingClass
in interface PsiMember
Member.getDeclaringClass()
public PsiElement getParent()
PsiElement
getParent
in interface PsiElement
getParent
in class LightElement
public boolean isEquivalentTo(PsiElement another)
PsiElement
PsiManager.areElementsEquivalent(PsiElement, PsiElement)
internally, which clients should invoke instead.
Implementations of this method should return true
if the parameter is resolve-equivalent to this
, i.e. it represents
the same entity from the language perspective. See also PsiManager.areElementsEquivalent(PsiElement, PsiElement)
documentation.isEquivalentTo
in interface PsiElement
isEquivalentTo
in class PsiElementBase