本文整理了Java中aQute.bnd.osgi.Jar.getDirectories()
方法的一些代码示例,展示了Jar.getDirectories()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jar.getDirectories()
方法的具体详情如下:
包路径:aQute.bnd.osgi.Jar
类名称:Jar
方法名:getDirectories
暂无
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
public void stripSignatures() {
Map<String, Resource> map = getDirectories().get("META-INF");
if (map != null) {
for (String file : new HashSet<>(map.keySet())) {
if (SIGNER_FILES_P.matcher(file)
.matches())
remove(file);
}
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
public void stripSignatures() {
Map<String, Resource> map = getDirectories().get("META-INF");
if (map != null) {
for (String file : new HashSet<>(map.keySet())) {
if (SIGNER_FILES_P.matcher(file)
.matches())
remove(file);
}
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
public void copy(Jar srce, String path, boolean overwrite) {
check();
addDirectory(srce.getDirectories()
.get(path), overwrite);
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
public void copy(Jar srce, String path, boolean overwrite) {
check();
addDirectory(srce.getDirectories()
.get(path), overwrite);
}
代码示例来源:origin: biz.aQute.bnd/bndlib
/**
* Get the exporter of a package ...
*/
public String _exporters(String args[]) throws Exception {
Macro.verifyCommand(args, "${exporters;<packagename>}, returns the list of jars that export the given package",
null, 2, 2);
StringBuilder sb = new StringBuilder();
String del = "";
String pack = args[1].replace('.', '/');
for (Jar jar : classpath) {
if (jar.getDirectories().containsKey(pack)) {
sb.append(del);
sb.append(jar.getName());
}
}
return sb.toString();
}
代码示例来源:origin: biz.aQute/bndlib
/**
* Get the exporter of a package ...
*/
public String _exporters(String args[]) throws Exception {
Macro.verifyCommand(args, "${exporters;<packagename>}, returns the list of jars that export the given package",
null, 2, 2);
StringBuilder sb = new StringBuilder();
String del = "";
String pack = args[1].replace('.', '/');
for (Jar jar : classpath) {
if (jar.getDirectories().containsKey(pack)) {
sb.append(del);
sb.append(jar.getName());
}
}
return sb.toString();
}
代码示例来源:origin: biz.aQute.bnd/bnd
/**
* Get the exporter of a package ...
*/
public String _exporters(String args[]) throws Exception {
Macro.verifyCommand(args, "${exporters;<packagename>}, returns the list of jars that export the given package",
null, 2, 2);
StringBuilder sb = new StringBuilder();
String del = "";
String pack = args[1].replace('.', '/');
for (Jar jar : classpath) {
if (jar.getDirectories().containsKey(pack)) {
sb.append(del);
sb.append(jar.getName());
}
}
return sb.toString();
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
/**
* Get the exporter of a package ...
*/
public String _exporters(String args[]) throws Exception {
Macro.verifyCommand(args, "${exporters;<packagename>}, returns the list of jars that export the given package",
null, 2, 2);
StringBuilder sb = new StringBuilder();
String del = "";
String pack = args[1].replace('.', '/');
for (Jar jar : classpath) {
if (jar.getDirectories()
.containsKey(pack)) {
sb.append(del);
sb.append(jar.getName());
}
}
return sb.toString();
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
/**
* Get the exporter of a package ...
*/
public String _exporters(String args[]) throws Exception {
Macro.verifyCommand(args, "${exporters;<packagename>}, returns the list of jars that export the given package",
null, 2, 2);
StringBuilder sb = new StringBuilder();
String del = "";
String pack = args[1].replace('.', '/');
for (Jar jar : classpath) {
if (jar.getDirectories()
.containsKey(pack)) {
sb.append(del);
sb.append(jar.getName());
}
}
return sb.toString();
}
代码示例来源:origin: biz.aQute.bnd/bndlib
public void copy(Jar srce, String path, boolean overwrite) {
check();
addDirectory(srce.getDirectories().get(path), overwrite);
}
代码示例来源:origin: biz.aQute.bnd/bnd
public void copy(Jar srce, String path, boolean overwrite) {
check();
addDirectory(srce.getDirectories().get(path), overwrite);
}
代码示例来源:origin: biz.aQute/bndlib
public void copy(Jar srce, String path, boolean overwrite) {
check();
addDirectory(srce.getDirectories().get(path), overwrite);
}
代码示例来源:origin: biz.aQute.bnd/bndlib
public boolean analyzeJar(Analyzer analyzer) throws Exception {
Jar jar = analyzer.getJar();
Map<String,Resource> dir = jar.getDirectories().get(root);
if (dir == null || dir.isEmpty()) {
Resource resource = jar.getResource(root);
if (resource != null)
process(analyzer, root, resource);
return false;
}
for (Iterator<Map.Entry<String,Resource>> i = dir.entrySet().iterator(); i.hasNext();) {
Map.Entry<String,Resource> entry = i.next();
String path = entry.getKey();
Resource resource = entry.getValue();
if (paths.matcher(path).matches()) {
process(analyzer, path, resource);
}
}
return false;
}
代码示例来源:origin: biz.aQute/bndlib
public boolean analyzeJar(Analyzer analyzer) throws Exception {
Jar jar = analyzer.getJar();
Map<String,Resource> dir = jar.getDirectories().get(root);
if (dir == null || dir.isEmpty()) {
Resource resource = jar.getResource(root);
if (resource != null)
process(analyzer, root, resource);
return false;
}
for (Iterator<Map.Entry<String,Resource>> i = dir.entrySet().iterator(); i.hasNext();) {
Map.Entry<String,Resource> entry = i.next();
String path = entry.getKey();
Resource resource = entry.getValue();
if (paths.matcher(path).matches()) {
process(analyzer, path, resource);
}
}
return false;
}
代码示例来源:origin: biz.aQute.bnd/bnd
public boolean analyzeJar(Analyzer analyzer) throws Exception {
Jar jar = analyzer.getJar();
Map<String,Resource> dir = jar.getDirectories().get(root);
if (dir == null || dir.isEmpty()) {
Resource resource = jar.getResource(root);
if (resource != null)
process(analyzer, root, resource);
return false;
}
for (Iterator<Map.Entry<String,Resource>> i = dir.entrySet().iterator(); i.hasNext();) {
Map.Entry<String,Resource> entry = i.next();
String path = entry.getKey();
Resource resource = entry.getValue();
if (paths.matcher(path).matches()) {
process(analyzer, path, resource);
}
}
return false;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
public boolean analyzeJar(Analyzer analyzer) throws Exception {
Jar jar = analyzer.getJar();
Map<String, Resource> dir = jar.getDirectories()
.get(root);
if (dir == null || dir.isEmpty()) {
Resource resource = jar.getResource(root);
if (resource != null)
process(analyzer, root, resource);
return false;
}
for (Iterator<Map.Entry<String, Resource>> i = dir.entrySet()
.iterator(); i.hasNext();) {
Map.Entry<String, Resource> entry = i.next();
String path = entry.getKey();
Resource resource = entry.getValue();
if (paths.matcher(path)
.matches()) {
process(analyzer, path, resource);
}
}
return false;
}
代码示例来源:origin: biz.aQute.bnd/bndlib
public void verifyBundleClasspath() {
Parameters bcp = main.getBundleClassPath();
if (bcp.isEmpty() || bcp.containsKey("."))
return;
for (String path : bcp.keySet()) {
if (path.endsWith("/"))
error("A " + Constants.BUNDLE_CLASSPATH + " entry must not end with '/': %s", path);
if (dot.getDirectories().containsKey(path))
// We assume that any classes are in a directory
// and therefore do not care when the bundle is included
return;
}
for (String path : dot.getResources().keySet()) {
if (path.endsWith(".class")) {
warning("The " + Constants.BUNDLE_CLASSPATH + " does not contain the actual bundle JAR (as specified with '.' in the " + Constants.BUNDLE_CLASSPATH + ") but the JAR does contain classes. Is this intentional?");
return;
}
}
}
代码示例来源:origin: biz.aQute/bndlib
public void verifyBundleClasspath() {
Parameters bcp = main.getBundleClassPath();
if (bcp.isEmpty() || bcp.containsKey("."))
return;
for (String path : bcp.keySet()) {
if (path.endsWith("/"))
error("A Bundle-ClassPath entry must not end with '/': %s", path);
if (dot.getDirectories().containsKey(path))
// We assume that any classes are in a directory
// and therefore do not care when the bundle is included
return;
}
for (String path : dot.getResources().keySet()) {
if (path.endsWith(".class")) {
warning("The Bundle-Classpath does not contain the actual bundle JAR (as specified with '.' in the Bundle-Classpath) but the JAR does contain classes. Is this intentional?");
return;
}
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
public void verifyBundleClasspath() {
Parameters bcp = main.getBundleClassPath();
if (bcp.isEmpty() || bcp.containsKey("."))
return;
for (String path : bcp.keySet()) {
if (path.endsWith("/"))
error("A " + Constants.BUNDLE_CLASSPATH + " entry must not end with '/': %s", path);
if (dot.getDirectories()
.containsKey(path))
// We assume that any classes are in a directory
// and therefore do not care when the bundle is included
return;
}
for (String path : dot.getResources()
.keySet()) {
if (path.endsWith(".class")) {
warning("The " + Constants.BUNDLE_CLASSPATH
+ " does not contain the actual bundle JAR (as specified with '.' in the "
+ Constants.BUNDLE_CLASSPATH + ") but the JAR does contain classes. Is this intentional?");
return;
}
}
}
代码示例来源:origin: biz.aQute.bnd/bnd
public void verifyBundleClasspath() {
Parameters bcp = main.getBundleClassPath();
if (bcp.isEmpty() || bcp.containsKey("."))
return;
for (String path : bcp.keySet()) {
if (path.endsWith("/"))
error("A " + Constants.BUNDLE_CLASSPATH + " entry must not end with '/': %s", path);
if (dot.getDirectories().containsKey(path))
// We assume that any classes are in a directory
// and therefore do not care when the bundle is included
return;
}
for (String path : dot.getResources().keySet()) {
if (path.endsWith(".class")) {
warning("The " + Constants.BUNDLE_CLASSPATH + " does not contain the actual bundle JAR (as specified with '.' in the " + Constants.BUNDLE_CLASSPATH + ") but the JAR does contain classes. Is this intentional?");
return;
}
}
}
内容来源于网络,如有侵权,请联系作者删除!