コード例 #1
0
 @Override
 @NotNull
 public PsiMethod[] getMethodsByName(
     @NonNls @NotNull String name, @NotNull GlobalSearchScope scope) {
   final Collection<? extends PsiMethod> methods =
       StubIndex.getInstance()
           .get(GrMethodNameIndex.KEY, name, myProject, new GrSourceFilterScope(scope));
   final Collection<? extends PsiMethod> annMethods =
       StubIndex.getInstance()
           .get(GrAnnotationMethodNameIndex.KEY, name, myProject, new GrSourceFilterScope(scope));
   if (methods.isEmpty() && annMethods.isEmpty()) return PsiMethod.EMPTY_ARRAY;
   return ArrayUtil.mergeCollections(annMethods, methods, PsiMethod.ARRAY_FACTORY);
 }
コード例 #2
0
 @NotNull
 private PsiClass[] getAllInnerClasses() {
   List<PsiClass> own = myClass.getOwnInnerClasses();
   List<PsiClass> ext = PsiAugmentProvider.collectAugments(myClass, PsiClass.class);
   return ArrayUtil.mergeCollections(own, ext, PsiClass.ARRAY_FACTORY);
 }
コード例 #3
0
 @NotNull
 private PsiMethod[] getAllMethods() {
   List<PsiMethod> own = myClass.getOwnMethods();
   List<PsiMethod> ext = PsiAugmentProvider.collectAugments(myClass, PsiMethod.class);
   return ArrayUtil.mergeCollections(own, ext, PsiMethod.ARRAY_FACTORY);
 }