int (Object element) { if (element instanceof File) { return 10; } if (element instanceof ModuleDescriptor) { return 20; } if (element instanceof LibraryDescriptor) { return ((LibraryDescriptor)element).getJars().size() > 1? 30 : 40; } return Integer.MAX_VALUE; }