use of xmlkit.XMLKit.Element in project jdk8u_jdk by JetBrains.
the class AnnotationsElementVisitor method visitLocal.
@Override
public Element visitLocal(Instruction i, int i1, Void p) {
Element ie = new Element(i.getMnemonic());
ie.setAttr("loc", "" + i1);
return ie;
}
use of xmlkit.XMLKit.Element in project jdk8u_jdk by JetBrains.
the class AnnotationsElementVisitor method visitConstantValue.
@Override
public Element visitConstantValue(ConstantValue_attribute cv, Element p) {
Element e = new Element(x.getCpString(cv.attribute_name_index));
e.add(x.getCpString(cv.constantvalue_index));
p.add(e);
return null;
}
use of xmlkit.XMLKit.Element in project jdk8u_jdk by JetBrains.
the class AnnotationsElementVisitor method visitInterfaceMethodref.
@Override
public String visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info c, Integer p) {
String value = slist.get(p);
if (value == null) {
try {
value = visit(cfpool.get(c.class_index), c.class_index);
value = value.concat(" " + visit(cfpool.get(c.name_and_type_index), c.name_and_type_index));
slist.set(p, value);
xpool.add(new Element("CONSTANT_InterfaceMethodref", new String[] { "id", p.toString() }, value));
} catch (ConstantPoolException ex) {
ex.printStackTrace();
}
}
return value;
}
use of xmlkit.XMLKit.Element in project jdk8u_jdk by JetBrains.
the class AnnotationsElementVisitor method visitMethodParameters.
@Override
public Element visitMethodParameters(MethodParameters_attribute mp, Element p) {
String name = x.getCpString(mp.attribute_name_index);
for (MethodParameters_attribute.Entry e : mp.method_parameter_table) {
Element l = new Element(name);
l.setAttr("name", x.getCpString(e.name_index));
l.setAttr("flag", "" + e.flags);
l.trimToSize();
p.add(l);
}
// already added to parent
return null;
}
use of xmlkit.XMLKit.Element in project jdk8u_jdk by JetBrains.
the class AnnotationsElementVisitor method visitSynthetic.
@Override
public Element visitSynthetic(Synthetic_attribute s, Element p) {
Element e = new Element(x.getCpString(s.attribute_name_index));
e.trimToSize();
p.add(e);
return null;
}
Aggregations