summaryrefslogtreecommitdiff
path: root/java/java-indexing-api/src/com/intellij/psi/search/searches/AllClassesSearch.java
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2013-08-07 11:11:08 -0700
committerTor Norbye <tnorbye@google.com>2013-08-07 11:11:08 -0700
commit6739a8f0977b70ddc8a8283b169902da3f2eecb3 (patch)
tree5c5573c2ac01544f02d9318671aa558769726289 /java/java-indexing-api/src/com/intellij/psi/search/searches/AllClassesSearch.java
parentc1ace1f7e1e49c81bb4b75377c99f07be340abfe (diff)
downloadidea-6739a8f0977b70ddc8a8283b169902da3f2eecb3.tar.gz
Snapshot af729d01433bb5bbd6ca93c0fdf9778b36d624ce from master branch of git://git.jetbrains.org/idea/community.git
Change-Id: I214dd066d0d27444a26166c0eae1a5aaf3705d49
Diffstat (limited to 'java/java-indexing-api/src/com/intellij/psi/search/searches/AllClassesSearch.java')
-rw-r--r--java/java-indexing-api/src/com/intellij/psi/search/searches/AllClassesSearch.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/java/java-indexing-api/src/com/intellij/psi/search/searches/AllClassesSearch.java b/java/java-indexing-api/src/com/intellij/psi/search/searches/AllClassesSearch.java
index 5ce8995988c1..21027204c180 100644
--- a/java/java-indexing-api/src/com/intellij/psi/search/searches/AllClassesSearch.java
+++ b/java/java-indexing-api/src/com/intellij/psi/search/searches/AllClassesSearch.java
@@ -22,10 +22,12 @@ package com.intellij.psi.search.searches;
import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Condition;
+import com.intellij.openapi.util.Conditions;
import com.intellij.psi.PsiClass;
import com.intellij.psi.search.SearchScope;
import com.intellij.util.Query;
import com.intellij.util.QueryExecutor;
+import org.jetbrains.annotations.NotNull;
public class AllClassesSearch extends ExtensibleQueryFactory<PsiClass, AllClassesSearch.SearchParameters> {
public static ExtensionPointName<QueryExecutor> EP_NAME = ExtensionPointName.create("com.intellij.allClassesSearch");
@@ -36,20 +38,22 @@ public class AllClassesSearch extends ExtensibleQueryFactory<PsiClass, AllClasse
private final Project myProject;
private final Condition<String> myShortNameCondition;
- public SearchParameters(final SearchScope scope, final Project project) {
- this(scope, project, Condition.TRUE);
+ public SearchParameters(@NotNull SearchScope scope, @NotNull Project project) {
+ this(scope, project, Conditions.<String>alwaysTrue());
}
- public SearchParameters(final SearchScope scope, final Project project, final Condition<String> shortNameCondition) {
+ public SearchParameters(@NotNull SearchScope scope, @NotNull Project project, @NotNull Condition<String> shortNameCondition) {
myScope = scope;
myProject = project;
myShortNameCondition = shortNameCondition;
}
+ @NotNull
public SearchScope getScope() {
return myScope;
}
+ @NotNull
public Project getProject() {
return myProject;
}
@@ -59,11 +63,13 @@ public class AllClassesSearch extends ExtensibleQueryFactory<PsiClass, AllClasse
}
}
- public static Query<PsiClass> search(SearchScope scope, Project project) {
+ @NotNull
+ public static Query<PsiClass> search(@NotNull SearchScope scope, @NotNull Project project) {
return INSTANCE.createQuery(new SearchParameters(scope, project));
}
- public static Query<PsiClass> search(SearchScope scope, Project project, Condition<String> shortNameCondition) {
+ @NotNull
+ public static Query<PsiClass> search(@NotNull SearchScope scope, @NotNull Project project, @NotNull Condition<String> shortNameCondition) {
return INSTANCE.createQuery(new SearchParameters(scope, project, shortNameCondition));
}
} \ No newline at end of file