本文整理了Java中aQute.bnd.osgi.Analyzer.getClasses()
方法的一些代码示例,展示了Analyzer.getClasses()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Analyzer.getClasses()
方法的具体详情如下:
包路径:aQute.bnd.osgi.Analyzer
类名称:Analyzer
方法名:getClasses
暂无
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
public String _classes(String... args) throws Exception {
Collection<Clazz> matched = getClasses(args);
if (matched.isEmpty())
return "";
return join(matched);
}
代码示例来源:origin: biz.aQute/bndlib
public String _classes(String... args) throws Exception {
// Macro.verifyCommand(args, _classesHelp, new
// Pattern[]{null,Pattern.compile("(implementing|implements|extending|extends|importing|imports|any)"),
// null}, 3,3);
Collection<Clazz> matched = getClasses(args);
if (matched.isEmpty())
return "";
return join(matched);
}
代码示例来源:origin: biz.aQute.bnd/bndlib
public String _classes(String... args) throws Exception {
// Macro.verifyCommand(args, _classesHelp, new
// Pattern[]{null,Pattern.compile("(implementing|implements|extending|extends|importing|imports|any)"),
// null}, 3,3);
Collection<Clazz> matched = getClasses(args);
if (matched.isEmpty())
return "";
return join(matched);
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
public String _classes(String... args) throws Exception {
Collection<Clazz> matched = getClasses(args);
if (matched.isEmpty())
return "";
return join(matched);
}
代码示例来源:origin: biz.aQute.bnd/bnd
public String _classes(String... args) throws Exception {
// Macro.verifyCommand(args, _classesHelp, new
// Pattern[]{null,Pattern.compile("(implementing|implements|extending|extends|importing|imports|any)"),
// null}, 3,3);
Collection<Clazz> matched = getClasses(args);
if (matched.isEmpty())
return "";
return join(matched);
}
代码示例来源:origin: biz.aQute.bnd/bndlib
/**
* Check if annotations are actually feasible looking at the class
* format. If the class format does not provide annotations then it is
* no use specifying annotated components.
*
* @param name
* @return
* @throws Exception
*/
private Collection<Clazz> checkAnnotationsFeasible(String name) throws Exception {
Collection<Clazz> not = analyzer.getClasses("", QUERY.NAMED.toString(), name //
);
if (not.isEmpty()) {
if ("*".equals(name))
return not;
error("Specified %s but could not find any class matching this pattern", name);
}
for (Clazz c : not) {
if (c.getFormat().hasAnnotations())
return not;
}
warning("Wildcards are used (%s) requiring annotations to decide what is a component. Wildcard maps to classes that are compiled with java.target < 1.5. Annotations were introduced in Java 1.5",
name);
return not;
}
代码示例来源:origin: biz.aQute/bndlib
/**
* Check if annotations are actually feasible looking at the class
* format. If the class format does not provide annotations then it is
* no use specifying annotated components.
*
* @param name
* @return
* @throws Exception
*/
private Collection<Clazz> checkAnnotationsFeasible(String name) throws Exception {
Collection<Clazz> not = analyzer.getClasses("", QUERY.NAMED.toString(), name //
);
if (not.isEmpty()) {
if ("*".equals(name))
return not;
error("Specified %s but could not find any class matching this pattern", name);
}
for (Clazz c : not) {
if (c.getFormat().hasAnnotations())
return not;
}
warning("Wildcards are used (%s) requiring annotations to decide what is a component. Wildcard maps to classes that are compiled with java.target < 1.5. Annotations were introduced in Java 1.5",
name);
return not;
}
代码示例来源:origin: biz.aQute.bnd/bnd
/**
* Check if annotations are actually feasible looking at the class
* format. If the class format does not provide annotations then it is
* no use specifying annotated components.
*
* @param name
* @return
* @throws Exception
*/
private Collection<Clazz> checkAnnotationsFeasible(String name) throws Exception {
Collection<Clazz> not = analyzer.getClasses("", QUERY.NAMED.toString(), name //
);
if (not.isEmpty()) {
if ("*".equals(name))
return not;
error("Specified %s but could not find any class matching this pattern", name);
}
for (Clazz c : not) {
if (c.getFormat().hasAnnotations())
return not;
}
warning("Wildcards are used (%s) requiring annotations to decide what is a component. Wildcard maps to classes that are compiled with java.target < 1.5. Annotations were introduced in Java 1.5",
name);
return not;
}
代码示例来源:origin: biz.aQute/bndlib
public boolean analyzeJar(Analyzer analyzer) throws Exception {
Parameters map = analyzer.parseHeader(analyzer.getProperty(Constants.METATYPE));
Jar jar = analyzer.getJar();
for (String name : map.keySet()) {
Collection<Clazz> metatypes = analyzer.getClasses("", QUERY.ANNOTATED.toString(), Meta.OCD.class.getName(), //
QUERY.NAMED.toString(), name //
);
for (Clazz c : metatypes) {
jar.putResource("OSGI-INF/metatype/" + c.getFQN() + ".xml", new MetaTypeReader(c, analyzer));
}
}
return false;
}
}
代码示例来源:origin: biz.aQute.bnd/bndlib
public boolean analyzeJar(Analyzer analyzer) throws Exception {
Parameters map = analyzer.parseHeader(analyzer.getProperty(Constants.METATYPE));
Jar jar = analyzer.getJar();
for (String name : map.keySet()) {
Collection<Clazz> metatypes = analyzer.getClasses("", QUERY.ANNOTATED.toString(), Meta.OCD.class.getName(), //
QUERY.NAMED.toString(), name //
);
for (Clazz c : metatypes) {
jar.putResource("OSGI-INF/metatype/" + c.getFQN() + ".xml", new MetaTypeReader(c, analyzer));
}
}
return false;
}
@Override
代码示例来源:origin: biz.aQute.bnd/bnd
public boolean analyzeJar(Analyzer analyzer) throws Exception {
Parameters map = analyzer.parseHeader(analyzer.getProperty(Constants.METATYPE));
Jar jar = analyzer.getJar();
for (String name : map.keySet()) {
Collection<Clazz> metatypes = analyzer.getClasses("", QUERY.ANNOTATED.toString(), Meta.OCD.class.getName(), //
QUERY.NAMED.toString(), name //
);
for (Clazz c : metatypes) {
jar.putResource("OSGI-INF/metatype/" + c.getFQN() + ".xml", new MetaTypeReader(c, analyzer));
}
}
return false;
}
@Override
代码示例来源:origin: biz.aQute/bndlib
Collection<Clazz> annotatedComponents = analyzer.getClasses("", QUERY.ANNOTATED.toString(),
Component.class.getName(), //
代码示例来源:origin: biz.aQute.bnd/bndlib
Collection<Clazz> annotatedComponents = analyzer.getClasses("", QUERY.ANNOTATED.toString(),
Component.class.getName(), //
代码示例来源:origin: biz.aQute.bnd/bnd
Collection<Clazz> annotatedComponents = analyzer.getClasses("", QUERY.ANNOTATED.toString(),
Component.class.getName(), //
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
Collection<Clazz> classes = analyzer.getClasses(null, "NAMED", name, "ANNOTATED",
"aQute.bnd.annotation.component.Component");
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
Collection<Clazz> classes = analyzer.getClasses(null, "NAMED", name, "ANNOTATED",
"aQute.bnd.annotation.component.Component");
代码示例来源:origin: apache/felix
Collection<Clazz> expanded = m_analyzer.getClasses("",
内容来源于网络,如有侵权,请联系作者删除!