1 19 20 package org.netbeans.spi.java.classpath; 21 22 import java.net.URL ; 23 import org.netbeans.api.java.classpath.ClassPath; 24 import org.netbeans.modules.java.classpath.ClassPathAccessor; 25 import org.openide.filesystems.FileUtil; 26 27 35 public final class ClassPathFactory { 36 37 private ClassPathFactory() { 38 } 39 40 45 public static ClassPath createClassPath(ClassPathImplementation spiClasspath) { 46 return ClassPathAccessor.DEFAULT.createClassPath(spiClasspath); 48 } 49 50 51 private static boolean checkEntries (ClassPathImplementation spiClasspath) { 52 for (PathResourceImplementation impl : spiClasspath.getResources()) { 53 URL [] roots = impl.getRoots(); 54 for (URL root : roots) { 55 if (FileUtil.isArchiveFile(root)) { 56 return false; 57 } 58 if (root.toExternalForm().endsWith("/")) { return false; 60 } 61 } 62 } 63 return true; 64 } 65 66 } 67 | Popular Tags |