use of com.sun.tools.classfile.Annotation 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);
}
}
}
}
use of com.sun.tools.classfile.Annotation in project jdk8u_jdk by JetBrains.
the class AnnotationsElementVisitor method visitRuntimeVisibleParameterAnnotations.
@Override
public Element visitRuntimeVisibleParameterAnnotations(RuntimeVisibleParameterAnnotations_attribute rvpa, Element p) {
Element e = new Element(x.getCpString(rvpa.attribute_name_index));
for (Annotation[] pa : rvpa.parameter_annotations) {
parseAnnotations(pa, e);
}
p.add(e);
return null;
}
Aggregations