本文整理了Java中aQute.bnd.osgi.Analyzer.getTypeRefFromPath()
方法的一些代码示例,展示了Analyzer.getTypeRefFromPath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Analyzer.getTypeRefFromPath()
方法的具体详情如下:
包路径:aQute.bnd.osgi.Analyzer
类名称:Analyzer
方法名:getTypeRefFromPath
暂无
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
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;
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
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;
}
代码示例来源:origin: biz.aQute.bnd/bnd
Resource r = entry.getValue();
if (key.endsWith(".class")) {
TypeRef ref = analyzer.getTypeRefFromPath(key);
if (filter.matches(ref.toString())) {
set.add(ref);
内容来源于网络,如有侵权,请联系作者删除!