use of com.sun.tools.classfile.RuntimeAnnotations_attribute in project checker-framework by typetools.
the class ComparisionException method findAnnotations.
/**
* Test the result of Attributes.getIndex according to expectations encoded in the method's
* name.
*/
private static void findAnnotations(ClassFile cf, Method m, String name, List<Annotation> annos) {
int index = m.attributes.getIndex(cf.constant_pool, name);
if (index != -1) {
Attribute attr = m.attributes.get(index);
assert attr instanceof RuntimeAnnotations_attribute;
RuntimeAnnotations_attribute tAttr = (RuntimeAnnotations_attribute) attr;
for (Annotation an : tAttr.annotations) {
if (!containsName(annos, an, cf)) {
annos.add(an);
}
}
}
}
use of com.sun.tools.classfile.RuntimeAnnotations_attribute in project checker-framework by typetools.
the class ComparisonException method findAnnotations.
/**
* Test the result of Attributes.getIndex according to expectations encoded in the method's name.
*/
private static void findAnnotations(ClassFile cf, Method m, String name, List<Annotation> annos) {
int index = m.attributes.getIndex(cf.constant_pool, name);
if (index != -1) {
Attribute attr = m.attributes.get(index);
assert attr instanceof RuntimeAnnotations_attribute;
RuntimeAnnotations_attribute tAttr = (RuntimeAnnotations_attribute) attr;
for (Annotation an : tAttr.annotations) {
if (!containsName(annos, an, cf)) {
annos.add(an);
}
}
}
}
Aggregations