use of xmlkit.XMLKit.Element in project jdk8u_jdk by JetBrains.
the class AnnotationsElementVisitor method visitUnknown.
@Override
public Element visitUnknown(Instruction i, Void p) {
Element e = new Element(i.getMnemonic());
e.setAttr("pc", "" + i.getPC());
e.setAttr("opcode", "" + i.getOpcode().opcode);
return e;
}
use of xmlkit.XMLKit.Element in project jdk8u_jdk by JetBrains.
the class AnnotationsElementVisitor method parseTypeAnnotations.
private void parseTypeAnnotations(TypeAnnotation pa, Element p) {
Element pta = new Element("RuntimeVisibleTypeAnnotation");
p.add(pta);
Position pos = pa.position;
parsePosition(pos, pta);
parseAnnotation(pa.annotation, pta);
}
use of xmlkit.XMLKit.Element in project jdk8u_jdk by JetBrains.
the class AnnotationsElementVisitor method visitCode.
@Override
public Element visitCode(Code_attribute c, Element p) {
Element e = null;
e = new Element(x.getCpString(c.attribute_name_index), "stack", "" + c.max_stack, "local", "" + c.max_locals);
e.add(instructions(e, c));
for (Code_attribute.Exception_data edata : c.exception_table) {
e.add(new Element("Handler", "start", "" + edata.start_pc, "end", "" + edata.end_pc, "catch", "" + edata.handler_pc, "class", x.getCpString(edata.catch_type)));
}
this.x.readAttributesFor(cf, c.attributes, e);
e.trimToSize();
p.add(e);
return null;
}
use of xmlkit.XMLKit.Element in project jdk8u_jdk by JetBrains.
the class AnnotationsElementVisitor method visitMethodHandle.
@Override
public String visitMethodHandle(CONSTANT_MethodHandle_info c, Integer p) {
String value = slist.get(p);
if (value == null) {
try {
value = c.reference_kind.name();
value = value.concat(" " + visit(cfpool.get(c.reference_index), c.reference_index));
slist.set(p, value);
xpool.add(new Element("CONSTANT_MethodHandle", 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 visitLong.
@Override
public String visitLong(CONSTANT_Long_info c, Integer p) {
String value = slist.get(p);
if (value == null) {
value = Long.toString(c.value);
slist.set(p, value);
xpool.add(new Element("CONSTANT_Long", new String[] { "id", p.toString() }, value));
}
return value;
}
Aggregations