public Attrs getByBinaryName(String s) { for (Map.Entry<PackageRef, Attrs> pr : map.entrySet()) { if (pr.getKey() .getBinary() .equals(s)) return pr.getValue(); } return null; }
public Attrs getByBinaryName(String s) { for (Map.Entry<PackageRef, Attrs> pr : map.entrySet()) { if (pr.getKey() .getBinary() .equals(s)) return pr.getValue(); } return null; }
public Attrs getByBinaryName(String s) { if (map == null) return null; for (Map.Entry<PackageRef,Attrs> pr : map.entrySet()) { if (pr.getKey().getBinary().equals(s)) pr.getValue(); } return null; }
String binary = i.next().getBinary(); Resource r = dot.getResource(binary); if ( r != null)
String binary = i.next().getBinary(); Resource r = dot.getResource(binary); if ( r != null)
.iterator(); i.hasNext();) { String binary = i.next() .getBinary(); Resource r = dot.getResource(binary); if (r != null)
.get(prefix + packageRef.getBinary()); if (dir == null || dir.size() == 0) return; Resource resource = jar.getResource(prefix + packageRef.getBinary() + "/package-info.class"); if (resource != null) { Attrs info = parsePackageInfoClass(resource); String path = prefix + packageRef.getBinary() + "/packageinfo"; Resource resource = jar.getResource(path); if (resource != null) {
if (check(Check.EXPORTS)) { Map<String, Resource> map = dot.getDirectories() .get(packageRef.getBinary()); if ((map == null || map.isEmpty())) { error("Exporting an empty package '%s'", packageRef.getFQN());
.get(prefix + packageRef.getBinary()); if (dir == null || dir.size() == 0) return; Resource resource = jar.getResource(prefix + packageRef.getBinary() + "/package-info.class"); if (resource != null) { Attrs info = parsePackageInfoClass(resource); String path = prefix + packageRef.getBinary() + "/packageinfo"; Resource resource = jar.getResource(path); if (resource != null) {
if (check(Check.EXPORTS)) { Map<String, Resource> map = dot.getDirectories() .get(packageRef.getBinary()); if ((map == null || map.isEmpty())) { error("Exporting an empty package '%s'", packageRef.getFQN());
public String getSourceFileFor(TypeRef type, Collection<File> sourcePath) throws Exception { Clazz clazz = findClass(type); if (clazz == null) { Attrs attrs = classpathExports.get(type.getPackageRef()); String from = attrs.get(Constants.FROM_DIRECTIVE); if (from != null) { return from; } return null; } String path = type.getPackageRef() .getBinary() + "/" + clazz.sourceFile; for (File srcDir : sourcePath) { if (!srcDir.isFile()) continue; File file = IO.getFile(srcDir, path); if (file.isFile()) { return IO.absolutePath(file); } } return ""; }
public String getSourceFileFor(TypeRef type, Collection<File> sourcePath) throws Exception { Clazz clazz = findClass(type); if (clazz == null) { Attrs attrs = classpathExports.get(type.getPackageRef()); String from = attrs.get(Constants.FROM_DIRECTIVE); if (from != null) { return from; } return null; } String path = type.getPackageRef() .getBinary() + "/" + clazz.sourceFile; for (File srcDir : sourcePath) { if (!srcDir.isFile()) continue; File file = IO.getFile(srcDir, path); if (file.isFile()) { return IO.absolutePath(file); } } return ""; }
private boolean hasSource(Analyzer analyzer, String path) throws Exception { if (!path.endsWith(".class")) return false; TypeRef type = analyzer.getTypeRefFromPath(path); PackageRef packageRef = type.getPackageRef(); Clazz clazz = analyzer.findClass(type); if (clazz == null) return false; String sourceFile = clazz.getSourceFile(); if (sourceFile == null) return false; String source = "OSGI-OPT/src/" + packageRef.getBinary() + "/" + sourceFile; Resource sourceResource = analyzer.getJar() .getResource(source); if (sourceResource == null) return false; return true; }
private boolean hasSource(Analyzer analyzer, String path) throws Exception { if (!path.endsWith(".class")) return false; TypeRef type = analyzer.getTypeRefFromPath(path); PackageRef packageRef = type.getPackageRef(); Clazz clazz = analyzer.findClass(type); if (clazz == null) return false; String sourceFile = clazz.getSourceFile(); if (sourceFile == null) return false; String source = "OSGI-OPT/src/" + packageRef.getBinary() + "/" + sourceFile; Resource sourceResource = analyzer.getJar() .getResource(source); if (sourceResource == null) return false; return true; }
public TypeRef getPackageInfo(PackageRef packageRef) { String bin = packageRef.getBinary() + "/package-info"; return getTypeRef(bin); }
public TypeRef getPackageInfo(PackageRef packageRef) { String bin = packageRef.getBinary() + "/package-info"; return getTypeRef(bin); }
public Attrs getByBinaryName(String s) { if (map == null) return null; for (Map.Entry<PackageRef,Attrs> pr : map.entrySet()) { if (pr.getKey().getBinary().equals(s)) pr.getValue(); } return null; }
public Attrs getByBinaryName(String s) { if (map == null) return null; for (Map.Entry<PackageRef,Attrs> pr : map.entrySet()) { if (pr.getKey().getBinary().equals(s)) pr.getValue(); } return null; }