public class PsiJavaModuleImpl extends JavaStubPsiElement<PsiJavaModuleStub> implements PsiJavaModule
Iconable.IconFlags, Iconable.LastComputedIcon
CREATION_TRACE, ourTraceStubAstBinding
FLAGS_LOCKED, ICON_PLACEHOLDER
AUTO_MODULE_NAME, JAVA_BASE, MODULE_INFO_CLASS, MODULE_INFO_CLS_FILE, MODULE_INFO_FILE, UPGRADEABLE
EMPTY_NAVIGATABLE_ELEMENT_ARRAY
EMPTY_NAVIGATION_ITEM_ARRAY
EMPTY_ARRAY
ARRAY_FACTORY
ICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
Constructor and Description |
---|
PsiJavaModuleImpl(ASTNode node) |
PsiJavaModuleImpl(PsiJavaModuleStub stub) |
Modifier and Type | Method and Description |
---|---|
void |
accept(PsiElementVisitor visitor)
Passes the element to the specified visitor.
|
PsiDocComment |
getDocComment()
Returns the JavaDoc comment for the element, or
null when the element has no JavaDoc comment. |
java.lang.Iterable<PsiPackageAccessibilityStatement> |
getExports() |
PsiModifierList |
getModifierList()
Returns the list of modifiers for the element.
|
java.lang.String |
getName()
Returns the name of the element.
|
PsiJavaModuleReferenceElement |
getNameIdentifier() |
java.lang.Iterable<PsiPackageAccessibilityStatement> |
getOpens() |
PsiElement |
getOriginalElement()
Returns the PSI element which corresponds to this element and belongs to
either the project source path or class path.
|
ItemPresentation |
getPresentation() |
java.lang.Iterable<PsiProvidesStatement> |
getProvides() |
java.lang.Iterable<PsiRequiresStatement> |
getRequires() |
int |
getTextOffset()
Returns the offset in the file to which the caret should be placed
when performing the navigation to the element.
|
java.lang.Iterable<PsiUsesStatement> |
getUses() |
SearchScope |
getUseScope()
Returns the scope in which references to this element are searched.
|
boolean |
hasModifierProperty(java.lang.String name)
Checks if the element has the specified modifier.
|
PsiElement |
setName(java.lang.String name)
Renames the element.
|
java.lang.String |
toString()
toString() should never be presented to the user.
|
acceptChildren, add, addAfter, addBefore, calcTreeElement, checkAdd, clone, cloneImpl, delete, deleteChildRange, getChildren, getLanguage, 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, getNavigationElement, getReference, getReferences, getResolveScope, 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
canNavigate, canNavigateToSource, navigate
getIdentifyingElement
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, getOwnReferences, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextRange, getTextRangeInParent, isEquivalentTo, isPhysical, isValid, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray
getUserData, putUserData
getAnnotation, getAnnotations, hasAnnotation, hasModifier
getElementType, getStub
public PsiJavaModuleImpl(PsiJavaModuleStub stub)
public PsiJavaModuleImpl(ASTNode node)
public java.lang.Iterable<PsiRequiresStatement> getRequires()
getRequires
in interface PsiJavaModule
public java.lang.Iterable<PsiPackageAccessibilityStatement> getExports()
getExports
in interface PsiJavaModule
public java.lang.Iterable<PsiPackageAccessibilityStatement> getOpens()
getOpens
in interface PsiJavaModule
public java.lang.Iterable<PsiUsesStatement> getUses()
getUses
in interface PsiJavaModule
public java.lang.Iterable<PsiProvidesStatement> getProvides()
getProvides
in interface PsiJavaModule
public PsiJavaModuleReferenceElement getNameIdentifier()
getNameIdentifier
in interface PsiJavaModule
getNameIdentifier
in interface PsiNameIdentifierOwner
public java.lang.String getName()
PsiNamedElement
getName
in interface NavigationItem
getName
in interface PsiJavaModule
getName
in interface PsiNamedElement
getName
in class PsiElementBase
public PsiElement setName(java.lang.String name) throws IncorrectOperationException
PsiNamedElement
setName
in interface PsiNamedElement
name
- the new element name.this
or a different element if the rename caused the element to be replaced).IncorrectOperationException
- if the modification is not supported or not possible for some reason.public PsiModifierList getModifierList()
PsiModifierListOwner
getModifierList
in interface PsiModifierListOwner
public boolean hasModifierProperty(java.lang.String name)
PsiModifierListOwner
PsiModifier
class.hasModifierProperty
in interface PsiModifierListOwner
name
- the name of the modifier to check.public PsiDocComment getDocComment()
PsiJavaDocumentedElement
null
when the element has no JavaDoc comment.getDocComment
in interface PsiJavaDocumentedElement
public ItemPresentation getPresentation()
getPresentation
in interface NavigationItem
getPresentation
in class PsiElementBase
public int getTextOffset()
PsiElement
PsiNamedElement
, this should return the offset in the file of the
name identifier.)getTextOffset
in interface PsiElement
getTextOffset
in class JavaStubPsiElement<PsiJavaModuleStub>
public PsiElement getOriginalElement()
PsiElement
this
or substitute a different element if this element does
not belong to the source path or class path. (For example, the original
element for a library source file is the corresponding compiled class file.)getOriginalElement
in interface PsiElement
getOriginalElement
in class PsiElementBase
public void accept(PsiElementVisitor visitor)
PsiElement
accept
in interface PsiElement
accept
in class PsiElementBase
visitor
- the visitor to pass the element to.public SearchScope getUseScope()
PsiElement
getUseScope
in interface PsiElement
getUseScope
in class PsiElementBase
PsiSearchHelper.getUseScope(PsiElement)
public java.lang.String toString()
PsiElement
toString
in interface PsiElement
toString
in class java.lang.Object