boolean (@NotNull Library library, @NotNull LibrariesContainer librariesContainer, @NotNull final Set<? extends LibraryKind> acceptedKinds) { final LibraryKind type = ((LibraryEx)library).getKind(); if (type != null && acceptedKinds.contains(type)) return true; final VirtualFile[] files = librariesContainer.getLibraryFiles(library, OrderRootType.CLASSES); return !LibraryDetectionManager.getInstance().processProperties(Arrays.asList(files), new LibraryDetectionManager.LibraryPropertiesProcessor() { @Override public <P extends LibraryProperties> boolean processProperties(@NotNull LibraryKind processedKind, @NotNull P properties) { return !acceptedKinds.contains(processedKind); } }); }