本文整理了Java中aQute.bnd.osgi.Analyzer.getTypeRef()
方法的一些代码示例,展示了Analyzer.getTypeRef()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Analyzer.getTypeRef()
方法的具体详情如下:
包路径:aQute.bnd.osgi.Analyzer
类名称:Analyzer
方法名:getTypeRef
暂无
代码示例来源:origin: biz.aQute/bndlib
void doExceptions(DataInputStream in, int access_flags) throws IOException {
int exception_count = in.readUnsignedShort();
for (int i = 0; i < exception_count; i++) {
int index = in.readUnsignedShort();
if (api != null && (Modifier.isPublic(access_flags) || Modifier.isProtected(access_flags))) {
ClassConstant cc = (ClassConstant) pool[index];
String descr = (String) pool[cc.cname];
TypeRef clazz = analyzer.getTypeRef(descr);
referTo(clazz, access_flags);
}
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
private boolean identifiableCollection(String type, boolean intface) {
return identifiableCollection(analyzer.getTypeRef(type), intface, true);
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
private boolean identifiableCollection(String type, boolean intface) {
return identifiableCollection(analyzer.getTypeRef(type), intface, true);
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
void doExceptions(DataInput in, int access_flags) throws IOException {
int exception_count = in.readUnsignedShort();
for (int i = 0; i < exception_count; i++) {
int index = in.readUnsignedShort();
ClassConstant cc = (ClassConstant) pool[index];
TypeRef clazz = analyzer.getTypeRef(cc.getName());
referTo(clazz, access_flags);
}
}
代码示例来源:origin: biz.aQute.bnd/bndlib
void doExceptions(DataInputStream in, int access_flags) throws IOException {
int exception_count = in.readUnsignedShort();
for (int i = 0; i < exception_count; i++) {
int index = in.readUnsignedShort();
ClassConstant cc = (ClassConstant) pool[index];
TypeRef clazz = analyzer.getTypeRef(cc.getName());
referTo(clazz, access_flags);
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
void doExceptions(DataInput in, int access_flags) throws IOException {
int exception_count = in.readUnsignedShort();
for (int i = 0; i < exception_count; i++) {
int index = in.readUnsignedShort();
ClassConstant cc = (ClassConstant) pool[index];
TypeRef clazz = analyzer.getTypeRef(cc.getName());
referTo(clazz, access_flags);
}
}
代码示例来源:origin: biz.aQute.bnd/bnd
void doExceptions(DataInputStream in, int access_flags) throws IOException {
int exception_count = in.readUnsignedShort();
for (int i = 0; i < exception_count; i++) {
int index = in.readUnsignedShort();
ClassConstant cc = (ClassConstant) pool[index];
TypeRef clazz = analyzer.getTypeRef(cc.getName());
referTo(clazz, access_flags);
}
}
代码示例来源:origin: biz.aQute/bndlib
void addAnnotation(Annotation a) {
if (annotations == null)
annotations = Create.set();
annotations.add(analyzer.getTypeRef(a.name.getBinary()));
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
private boolean isProvider(TypeRef t) {
Clazz c;
try {
c = findClass(t);
} catch (Exception e) {
return false;
}
if (c == null)
return false;
TypeRef providerType = getTypeRef("org/osgi/annotation/versioning/ProviderType");
return c.annotations()
.contains(providerType);
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
private boolean isProvider(TypeRef t) {
Clazz c;
try {
c = findClass(t);
} catch (Exception e) {
return false;
}
if (c == null)
return false;
TypeRef providerType = getTypeRef("org/osgi/annotation/versioning/ProviderType");
return c.annotations()
.contains(providerType);
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
void addAnnotation(Annotation a) {
if (annotations == null)
annotations = Create.set();
annotations.add(analyzer.getTypeRef(a.getName()
.getBinary()));
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
void addAnnotation(Annotation a) {
if (annotations == null)
annotations = Create.set();
annotations.add(analyzer.getTypeRef(a.getName()
.getBinary()));
}
代码示例来源:origin: biz.aQute.bnd/bndlib
void addAnnotation(Annotation a) {
if (annotations == null)
annotations = Create.set();
annotations.add(analyzer.getTypeRef(a.getName().getBinary()));
}
代码示例来源:origin: biz.aQute.bnd/bnd
void addAnnotation(Annotation a) {
if (annotations == null)
annotations = Create.set();
annotations.add(analyzer.getTypeRef(a.getName().getBinary()));
}
代码示例来源:origin: biz.aQute.bnd/bndlib
private void classConstRef(int lastReference) {
Object o = pool[lastReference];
if (o == null)
return;
if (o instanceof ClassConstant) {
ClassConstant cc = (ClassConstant) o;
if (cc.referred)
return;
cc.referred = true;
String name = cc.getName();
if (name != null) {
TypeRef tr = analyzer.getTypeRef(name);
referTo(tr, 0);
}
}
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
private void classConstRef(int index) {
Object o = pool[index];
if (o == null) {
return;
}
if (o instanceof ClassConstant) {
ClassConstant cc = (ClassConstant) o;
if (cc.referred) {
return;
}
cc.referred = true;
String name = cc.getName();
if (name != null) {
TypeRef tr = analyzer.getTypeRef(name);
referTo(tr, 0);
}
}
}
代码示例来源:origin: biz.aQute.bnd/bnd
private void classConstRef(int lastReference) {
Object o = pool[lastReference];
if (o == null)
return;
if (o instanceof ClassConstant) {
ClassConstant cc = (ClassConstant) o;
if (cc.referred)
return;
cc.referred = true;
String name = cc.getName();
if (name != null) {
TypeRef tr = analyzer.getTypeRef(name);
referTo(tr, 0);
}
}
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
private void classConstRef(int index) {
Object o = pool[index];
if (o == null) {
return;
}
if (o instanceof ClassConstant) {
ClassConstant cc = (ClassConstant) o;
if (cc.referred) {
return;
}
cc.referred = true;
String name = cc.getName();
if (name != null) {
TypeRef tr = analyzer.getTypeRef(name);
referTo(tr, 0);
}
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib
private boolean acceptableType(String rtype) {
TypeRef ref = analyzer.getTypeRef(rtype);
try {
Clazz returnType = analyzer.findClass(ref);
if (returnType.isEnum()) {
return true;
}
// TODO check this is true for interfaces and annotations
if (!returnType.isAbstract() || (returnType.isInterface() && options.contains(Options.nested))) {
return true;
}
if (!returnType.isInterface()) {
analyzer.error("Abstract classes not allowed as interface method return values: %s", rtype);
} else {
analyzer.error("Nested metatype only allowed with option: nested type %s", rtype);
}
return false;
} catch (Exception e) {
analyzer.exception(e, "could not examine class for return type %s, exception message: %s", rtype, e);
return false;
}
}
代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd
private boolean acceptableType(String rtype) {
TypeRef ref = analyzer.getTypeRef(rtype);
try {
Clazz returnType = analyzer.findClass(ref);
if (returnType.isEnum()) {
return true;
}
// TODO check this is true for interfaces and annotations
if (!returnType.isAbstract() || (returnType.isInterface() && options.contains(Options.nested))) {
return true;
}
if (!returnType.isInterface()) {
analyzer.error("Abstract classes not allowed as interface method return values: %s", rtype);
} else {
analyzer.error("Nested metatype only allowed with option: nested type %s", rtype);
}
return false;
} catch (Exception e) {
analyzer.exception(e, "could not examine class for return type %s, exception message: %s", rtype, e);
return false;
}
}
内容来源于网络,如有侵权,请联系作者删除!