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); } } }
private boolean identifiableCollection(String type, boolean intface) { return identifiableCollection(analyzer.getTypeRef(type), intface, true); }
private boolean identifiableCollection(String type, boolean intface) { return identifiableCollection(analyzer.getTypeRef(type), intface, true); }
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); } }
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); } }
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); } }
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); } }
void addAnnotation(Annotation a) { if (annotations == null) annotations = Create.set(); annotations.add(analyzer.getTypeRef(a.name.getBinary())); }
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); }
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); }
void addAnnotation(Annotation a) { if (annotations == null) annotations = Create.set(); annotations.add(analyzer.getTypeRef(a.getName() .getBinary())); }
void addAnnotation(Annotation a) { if (annotations == null) annotations = Create.set(); annotations.add(analyzer.getTypeRef(a.getName() .getBinary())); }
void addAnnotation(Annotation a) { if (annotations == null) annotations = Create.set(); annotations.add(analyzer.getTypeRef(a.getName().getBinary())); }
void addAnnotation(Annotation a) { if (annotations == null) annotations = Create.set(); annotations.add(analyzer.getTypeRef(a.getName().getBinary())); }
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); } } } }
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); } } }
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); } } } }
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); } } }
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; } }
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; } }