public class LightJavaModule extends LightElement implements PsiJavaModule
Iconable.IconFlags, Iconable.LastComputedIcon
myManager
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
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
claimedModuleName(VirtualFile manifest) |
boolean |
equals(java.lang.Object obj) |
static LightJavaModule |
findModule(PsiManager manager,
VirtualFile root)
The method is expected to be called on roots obtained from JavaAutoModuleNameIndex/JavaSourceModuleNameIndex
|
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.
|
static LightJavaModule |
getModule(PsiManager manager,
VirtualFile root)
Deprecated.
method scope was extended, use
findModule(com.intellij.psi.PsiManager, com.intellij.openapi.vfs.VirtualFile) instead |
java.lang.String |
getName()
Returns the name of the element.
|
PsiJavaModuleReferenceElement |
getNameIdentifier() |
PsiElement |
getNavigationElement()
Returns the PSI element which should be used as a navigation target
when navigation to this PSI element is requested.
|
java.lang.Iterable<PsiPackageAccessibilityStatement> |
getOpens() |
ItemPresentation |
getPresentation() |
java.lang.Iterable<PsiProvidesStatement> |
getProvides() |
java.lang.Iterable<PsiRequiresStatement> |
getRequires() |
VirtualFile |
getRootVirtualFile() |
java.lang.Iterable<PsiUsesStatement> |
getUses() |
int |
hashCode() |
boolean |
hasModifierProperty(java.lang.String name)
Checks if the element has the specified modifier.
|
static java.lang.String |
moduleName(java.lang.String name)
Implements a name deriving for automatic modules as described in ModuleFinder.of(Path...) method documentation.
|
static java.lang.String |
moduleName(VirtualFile jarRoot) |
PsiElement |
setName(java.lang.String name)
Renames the element.
|
java.lang.String |
toString()
toString() should never be presented to the user.
|
accept, add, addAfter, addBefore, checkAdd, checkDelete, copy, delete, findElementAt, getChildren, getContainingFile, getLanguage, getManager, getNextSibling, getNode, getParent, 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, getProject, getReference, getReferences, getResolveScope, getUseScope, isEquivalentTo, navigate, notNullChild, processDeclarations, textContains
buildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getElementIcon, getIcon, iconWithVisibilityIfNeeded, isNativeFileType, isVisibilitySupported, overlayIcons, registerIconLayer, transformFlags
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
finalize, getClass, notify, notifyAll, wait, wait, wait
canNavigate, canNavigateToSource, navigate
getIdentifyingElement
accept, acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getCopyableUserData, getFirstChild, getLanguage, getLastChild, getManager, 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
getAnnotation, getAnnotations, hasAnnotation, hasModifier
public VirtualFile getRootVirtualFile()
public PsiDocComment getDocComment()
PsiJavaDocumentedElement
null
when the element has no JavaDoc comment.getDocComment
in interface PsiJavaDocumentedElement
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 ItemPresentation getPresentation()
getPresentation
in interface NavigationItem
getPresentation
in class PsiElementBase
public PsiElement getNavigationElement()
PsiElement
this
or substitute a different element if this element
does not have an associated file and offset. (For example, if the source code
of a library is attached to a project, the navigation element for a compiled
library class is its source class.)getNavigationElement
in interface PsiElement
getNavigationElement
in class LightElement
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
PsiElement
toString
in interface PsiElement
toString
in class LightElement
@Deprecated public static LightJavaModule getModule(PsiManager manager, VirtualFile root)
findModule(com.intellij.psi.PsiManager, com.intellij.openapi.vfs.VirtualFile)
insteadpublic static LightJavaModule findModule(PsiManager manager, VirtualFile root)
public static java.lang.String moduleName(VirtualFile jarRoot)
public static java.lang.String claimedModuleName(VirtualFile manifest)
public static java.lang.String moduleName(java.lang.String name)
Implements a name deriving for automatic modules as described in ModuleFinder.of(Path...) method documentation.
Please note that the result may not be a valid module name when the source contains a sequence that starts with a digit
(e.g. "org.7gnomes..."). One may validate the result with PsiNameHelper.isValidModuleName(java.lang.String, com.intellij.psi.PsiElement)
.
name
- a .jar file name without extension