com.intellij.psi
Interface PsiField
- All Superinterfaces:
- Iconable, Navigatable, NavigationItem, PsiDocCommentOwner, PsiElement, PsiMember, PsiModifierListOwner, PsiNamedElement, PsiVariable, UserDataHolder
- All Known Subinterfaces:
- PsiAspectField, PsiEnumConstant, PsiIntertypeField
public interface PsiField
- extends PsiMember, PsiVariable, PsiDocCommentOwner
Represents a Java field or enum constant.
|
Field Summary |
static PsiField[] |
EMPTY_ARRAY
The empty array of PSI fields which can be reused to avoid unnecessary allocations. |
|
Method Summary |
PomField |
getPom()
Returns the POM representation of the field. |
void |
setInitializer(PsiExpression initializer)
Adds initializer to the field declaration or, if initializer parameter is null,
removes the initializer from the field declaration. |
EMPTY_ARRAY
static final PsiField[] EMPTY_ARRAY
- The empty array of PSI fields which can be reused to avoid unnecessary allocations.
getPom
PomField getPom()
- Returns the
POM representation of the field.
- Returns:
- the POM representation.
setInitializer
void setInitializer(@Nullable
PsiExpression initializer)
throws IncorrectOperationException
- Adds initializer to the field declaration or, if
initializer parameter is null,
removes the initializer from the field declaration.
- Parameters:
initializer - the initializer to add.
- Throws:
IncorrectOperationException - if the modifications fails for some reason.- Since:
- 5.0.2