Exemple #1
0
 private static boolean containsConflictingClass(String fqName, PsiJavaFile file) {
   final PsiClass[] classes = file.getClasses();
   for (PsiClass aClass : classes) {
     if (containsConflictingInnerClass(fqName, aClass)) {
       return true;
     }
   }
   return false;
 }
Exemple #2
0
 private static boolean containsConflictingClassName(String fqName, PsiJavaFile file) {
   final int lastDotIndex = fqName.lastIndexOf((int) '.');
   final String shortName = fqName.substring(lastDotIndex + 1);
   final PsiClass[] classes = file.getClasses();
   for (PsiClass aClass : classes) {
     if (shortName.equals(aClass.getName())) {
       return true;
     }
   }
   return false;
 }