@NotNull public static Collection<JavaClass> getClassesInPackage(@NotNull JavaPackage javaPackage) { Collection<JavaClass> classes = javaPackage.getClasses(); Set<FqName> addedQualifiedNames = new HashSet<FqName>(classes.size()); List<JavaClass> result = new ArrayList<JavaClass>(classes.size()); for (JavaClass javaClass : classes) { FqName fqName = javaClass.getFqName(); if (fqName != null && addedQualifiedNames.add(fqName)) { result.add(javaClass); } } return result; }
@Nullable @Override public ClassDescriptor getClass(@NotNull JavaClass javaClass) { FqName fqName = javaClass.getFqName(); if (fqName != null && KotlinBuiltIns.BUILT_INS_PACKAGE_FQ_NAME.equals(fqName.parent())) { if (javaClass.findAnnotation(ASSERT_INVISIBLE_IN_RESOLVER_ANNOTATION) != null) { if (ApplicationManager.getApplication().isInternal()) { LOG.error( "Classpath is configured incorrectly:" + " class " + fqName + " from runtime must not be loaded by compiler"); } return null; } } return trace.get(CLASS, ((JavaClassImpl) javaClass).getPsi()); }