本文整理了Java中aQute.bnd.osgi.Analyzer.getSourceFileFor()
方法的一些代码示例,展示了Analyzer.getSourceFileFor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Analyzer.getSourceFileFor()
方法的具体详情如下:
包路径:aQute.bnd.osgi.Analyzer
类名称:Analyzer
方法名:getSourceFileFor
[英]Find the source file for this type
[中]查找此类型的源文件
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
/**
* Find the source file for this type
*
* @param type
* @throws Exception
*/
public String getSourceFileFor(TypeRef type) throws Exception {
Set<File> sp = Collections.singleton(getFile(getProperty(DEFAULT_PROP_SRC_DIR, "src")));
return getSourceFileFor(type, sp);
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
/**
* Find the source file for this type
*
* @param type
* @throws Exception
*/
public String getSourceFileFor(TypeRef type) throws Exception {
Set<File> sp = Collections.singleton(getFile(getProperty(DEFAULT_PROP_SRC_DIR, "src")));
return getSourceFileFor(type, sp);
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
/**
* Set location information for a type.
*/
public void setTypeLocation(SetLocation location, TypeRef type) throws Exception {
String sf = getSourceFileFor(type);
if (sf != null) {
File sff = IO.getFile(sf);
if (sff != null) {
String names[] = {
type.getShorterName(), type.getFQN(), type.getShortName()
.replace('$', '.')
};
for (String name : names) {
FileLine fl = Processor.findHeader(sff,
Pattern.compile("(class|interface)\\s*" + name, Pattern.DOTALL));
if (fl != null)
fl.set(location);
}
}
location.file(sf);
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
/**
* Set location information for a type.
*/
public void setTypeLocation(SetLocation location, TypeRef type) throws Exception {
String sf = getSourceFileFor(type);
if (sf != null) {
File sff = IO.getFile(sf);
if (sff != null) {
String names[] = {
type.getShorterName(), type.getFQN(), type.getShortName()
.replace('$', '.')
};
for (String name : names) {
FileLine fl = Processor.findHeader(sff,
Pattern.compile("(class|interface)\\s*" + name, Pattern.DOTALL));
if (fl != null)
fl.set(location);
}
}
location.file(sf);
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
clazz.getFQN());
TypeRef cname = clazz.getClassName();
String source = analyzer.getSourceFileFor(cname);
if (source != null) {
File f = getFile(source);
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
clazz.getFQN());
TypeRef cname = clazz.getClassName();
String source = analyzer.getSourceFileFor(cname);
if (source != null) {
File f = getFile(source);
内容来源于网络,如有侵权,请联系作者删除!