public abstract class PsiShortNamesCache
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static ExtensionPointName<PsiShortNamesCache> |
EP_NAME |
Constructor and Description |
---|
PsiShortNamesCache() |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.String [] |
getAllClassNames()
Returns the list of names of all classes in the project and
(optionally) libraries.
|
void |
getAllClassNames(HashSet<? super java.lang.String> dest)
|
abstract java.lang.String [] |
getAllFieldNames()
Returns the list of names of all fields in the project and
(optionally) libraries.
|
java.lang.String [] |
getAllFileNames()
Returns the list of names of all files in the project.
|
abstract java.lang.String [] |
getAllMethodNames()
Returns the list of names of all methods in the project and
(optionally) libraries.
|
abstract PsiClass [] |
getClassesByName(java.lang.String name,
GlobalSearchScope scope)
Returns the list of all classes with the specified name in the specified scope.
|
abstract PsiField [] |
getFieldsByName(java.lang.String name,
GlobalSearchScope scope)
Returns the list of all fields with the specified name in the specified scope.
|
abstract PsiField [] |
getFieldsByNameIfNotMoreThan(java.lang.String name,
GlobalSearchScope scope,
int maxCount) |
PsiFile [] |
getFilesByName(java.lang.String name)
Returns the list of files with the specified name.
|
static PsiShortNamesCache |
getInstance(Project project)
Return the composite short names cache, uniting all short name cache instances registered via extensions.
|
abstract PsiMethod [] |
getMethodsByName(java.lang.String name,
GlobalSearchScope scope)
Returns the list of all methods with the specified name in the specified scope.
|
abstract PsiMethod [] |
getMethodsByNameIfNotMoreThan(java.lang.String name,
GlobalSearchScope scope,
int maxCount) |
boolean |
processAllClassNames(Processor<? super java.lang.String> processor) |
boolean |
processAllClassNames(Processor<? super java.lang.String> processor,
GlobalSearchScope scope,
IdFilter filter) |
boolean |
processAllFieldNames(Processor<? super java.lang.String> processor,
GlobalSearchScope scope,
IdFilter filter) |
boolean |
processAllMethodNames(Processor<? super java.lang.String> processor,
GlobalSearchScope scope,
IdFilter filter) |
boolean |
processClassesWithName(java.lang.String name,
Processor<? super PsiClass> processor,
GlobalSearchScope scope,
IdFilter filter) |
boolean |
processFieldsWithName(java.lang.String name,
Processor<? super PsiField> processor,
GlobalSearchScope scope,
IdFilter filter) |
abstract boolean |
processMethodsWithName(java.lang.String name,
GlobalSearchScope scope,
Processor<? super PsiMethod> processor) |
boolean |
processMethodsWithName(java.lang.String name,
Processor<? super PsiMethod> processor,
GlobalSearchScope scope,
IdFilter filter) |
public static final ExtensionPointName<PsiShortNamesCache> EP_NAME
public static PsiShortNamesCache getInstance(Project project)
project
- the project to return the cache for.public PsiFile [] getFilesByName(java.lang.String name)
name
- the name of the files to find.public java.lang.String [] getAllFileNames()
public abstract PsiClass [] getClassesByName(java.lang.String name, GlobalSearchScope scope)
name
- the non-qualified name of the classes to find.scope
- the scope in which classes are searched.public abstract java.lang.String [] getAllClassNames()
public boolean processAllClassNames(Processor<? super java.lang.String> processor)
public boolean processAllClassNames(Processor<? super java.lang.String> processor, GlobalSearchScope scope, IdFilter filter)
@Deprecated public void getAllClassNames(HashSet<? super java.lang.String> dest)
dest
- the set to add the names to.public abstract PsiMethod [] getMethodsByName(java.lang.String name, GlobalSearchScope scope)
name
- the name of the methods to find.scope
- the scope in which methods are searched.public abstract PsiMethod [] getMethodsByNameIfNotMoreThan(java.lang.String name, GlobalSearchScope scope, int maxCount)
public abstract PsiField [] getFieldsByNameIfNotMoreThan(java.lang.String name, GlobalSearchScope scope, int maxCount)
public abstract boolean processMethodsWithName(java.lang.String name, GlobalSearchScope scope, Processor<? super PsiMethod> processor)
public boolean processMethodsWithName(java.lang.String name, Processor<? super PsiMethod> processor, GlobalSearchScope scope, IdFilter filter)
public boolean processAllMethodNames(Processor<? super java.lang.String> processor, GlobalSearchScope scope, IdFilter filter)
public boolean processAllFieldNames(Processor<? super java.lang.String> processor, GlobalSearchScope scope, IdFilter filter)
public abstract java.lang.String [] getAllMethodNames()
public abstract PsiField [] getFieldsByName(java.lang.String name, GlobalSearchScope scope)
name
- the name of the fields to find.scope
- the scope in which fields are searched.public abstract java.lang.String [] getAllFieldNames()
public boolean processFieldsWithName(java.lang.String name, Processor<? super PsiField> processor, GlobalSearchScope scope, IdFilter filter)
public boolean processClassesWithName(java.lang.String name, Processor<? super PsiClass> processor, GlobalSearchScope scope, IdFilter filter)