public interface PsiPackage extends PsiCheckedRenameElement, NavigationItem, PsiJvmModifiersOwner, PsiDirectoryContainer, PsiQualifiedNamedElement, JvmPackage
Iconable.IconFlags, Iconable.LastComputedIcon
Modifier and Type | Field and Description |
---|---|
static PsiPackage[] |
EMPTY_ARRAY |
static java.lang.String |
PACKAGE_INFO_CLASS |
static java.lang.String |
PACKAGE_INFO_CLS_FILE |
static java.lang.String |
PACKAGE_INFO_FILE |
EMPTY_NAVIGATION_ITEM_ARRAY
ARRAY_FACTORY
ICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
Modifier and Type | Method and Description |
---|---|
boolean |
containsClassNamed(java.lang.String name) |
PsiClass [] |
findClassByShortName(java.lang.String name,
GlobalSearchScope scope) |
PsiModifierList |
getAnnotationList()
Returns the list of package-level annotations for the package.
|
PsiClass [] |
getClasses()
Returns the list of classes in all directories corresponding to the package.
|
PsiClass [] |
getClasses(GlobalSearchScope scope)
Returns the list of classes in directories corresponding to the package in the specified
search scope.
|
PsiFile [] |
getFiles(GlobalSearchScope scope)
Returns the list of all files in the package, restricted by the specified scope.
|
java.lang.String |
getName()
Returns the name of the element.
|
PsiPackage |
getParentPackage()
Returns the parent of the package.
|
java.lang.String |
getQualifiedName()
Returns the full-qualified name of the package.
|
PsiPackage [] |
getSubPackages()
Returns the list of subpackages of this package under all source roots of the project.
|
PsiPackage [] |
getSubPackages(GlobalSearchScope scope)
Returns the list of subpackages of this package in the specified search scope.
|
void |
handleQualifiedNameChange(java.lang.String newQualifiedName)
This method must be invoked on the package after all directories corresponding
to it have been renamed/moved accordingly to qualified name change.
|
VirtualFile [] |
occursInPackagePrefixes()
Returns source roots that this package occurs in package prefixes of.
|
checkSetName
getPresentation
canNavigate, canNavigateToSource, navigate
getAnnotation, getAnnotations, getSourceElement, hasAnnotation, hasModifier
getModifierList, hasModifierProperty
accept
getDirectories, getDirectories
setName
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, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, getTextRangeInParent, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray, toString
getUserData, putUserData
static final java.lang.String PACKAGE_INFO_CLASS
static final java.lang.String PACKAGE_INFO_FILE
static final java.lang.String PACKAGE_INFO_CLS_FILE
static final PsiPackage[] EMPTY_ARRAY
java.lang.String getQualifiedName()
getQualifiedName
in interface JvmPackage
getQualifiedName
in interface PsiQualifiedNamedElement
PsiPackage getParentPackage()
getParentPackage
in interface JvmPackage
PsiPackage [] getSubPackages()
PsiPackage [] getSubPackages(GlobalSearchScope scope)
scope
- the scope in which packages are searched.PsiClass [] getClasses()
PsiClass [] getClasses(GlobalSearchScope scope)
scope
- the scope in which directories are searched.PsiFile [] getFiles(GlobalSearchScope scope)
PsiModifierList getAnnotationList()
void handleQualifiedNameChange(java.lang.String newQualifiedName)
newQualifiedName
- the new qualified name of the package.VirtualFile [] occursInPackagePrefixes()
java.lang.String getName()
PsiNamedElement
getName
in interface JvmNamedElement
getName
in interface JvmPackage
getName
in interface NavigationItem
getName
in interface PsiNamedElement
getName
in interface PsiQualifiedNamedElement
boolean containsClassNamed(java.lang.String name)
PsiClass [] findClassByShortName(java.lang.String name, GlobalSearchScope scope)