public abstract class JavaPsiFacade
extends java.lang.Object
Constructor and Description |
---|
JavaPsiFacade() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
arePackagesTheSame(PsiElement element1,
PsiElement element2)
Checks if the specified PSI elements belong to the same package.
|
abstract PsiClass |
findClass(java.lang.String qualifiedName,
GlobalSearchScope scope)
Searches the specified scope within the project for a class with the specified full-qualified
name and returns one if it is found.
|
abstract PsiClass [] |
findClasses(java.lang.String qualifiedName,
GlobalSearchScope scope)
Searches the specified scope within the project for classes with the specified full-qualified
name and returns all found classes.
|
abstract PsiJavaModule |
findModule(java.lang.String moduleName,
GlobalSearchScope scope)
Searches the scope for a unique Java module with the given name.
|
abstract java.util.Collection<PsiJavaModule> |
findModules(java.lang.String moduleName,
GlobalSearchScope scope)
Searches the scope for Java modules with the given name.
|
abstract PsiPackage |
findPackage(java.lang.String qualifiedName)
Searches the project for the package with the specified full-qualified name and returns one
if it is found.
|
abstract PsiConstantEvaluationHelper |
getConstantEvaluationHelper()
Returns the constant expression evaluator for the project.
|
abstract PsiElementFactory |
getElementFactory()
Returns the element factory for the project, which can be used to
create instances of Java elements.
|
static PsiElementFactory |
getElementFactory(Project project) |
static JavaPsiFacade |
getInstance(Project project) |
abstract PsiNameHelper |
getNameHelper()
Deprecated.
|
abstract PsiJavaParserFacade |
getParserFacade()
Returns the factory for the project, which can be used to create instances of certain Java constructs from their textual
representation.
|
abstract Project |
getProject() |
abstract PsiResolveHelper |
getResolveHelper()
Returns the resolve helper for the project, which can be used to resolve references
and check accessibility of elements.
|
abstract boolean |
isConstantExpression(PsiExpression expression) |
abstract boolean |
isInPackage(PsiElement element,
PsiPackage aPackage)
Checks if the specified PSI element belongs to the specified package.
|
abstract boolean |
isPartOfPackagePrefix(java.lang.String packageName)
Checks if the specified package name is part of the package prefix for
any of the modules in this project.
|
public static JavaPsiFacade getInstance(Project project)
public static PsiElementFactory getElementFactory(Project project)
public abstract PsiClass findClass(java.lang.String qualifiedName, GlobalSearchScope scope)
null
if no class with such name is found.public abstract PsiClass [] findClasses(java.lang.String qualifiedName, GlobalSearchScope scope)
public abstract PsiPackage findPackage(java.lang.String qualifiedName)
null
if no package with such name is found.public abstract PsiJavaModule findModule(java.lang.String moduleName, GlobalSearchScope scope)
public abstract java.util.Collection<PsiJavaModule> findModules(java.lang.String moduleName, GlobalSearchScope scope)
public abstract PsiElementFactory getElementFactory()
public abstract PsiJavaParserFacade getParserFacade()
getElementFactory()
instead, which
provides exactly same methods but ensures created instances will get properly formatted.public abstract PsiResolveHelper getResolveHelper()
@Deprecated public abstract PsiNameHelper getNameHelper()
PsiNameHelper.getInstance(Project)
public abstract PsiConstantEvaluationHelper getConstantEvaluationHelper()
public abstract boolean isPartOfPackagePrefix(java.lang.String packageName)
public abstract boolean isInPackage(PsiElement element, PsiPackage aPackage)
public abstract boolean arePackagesTheSame(PsiElement element1, PsiElement element2)
public abstract Project getProject()
public abstract boolean isConstantExpression(PsiExpression expression)