Search in sources :

Example 1 with Element

use of xmlkit.XMLKit.Element in project jdk8u_jdk by JetBrains.

the class AnnotationsElementVisitor method visitLocalAndValue.

@Override
public Element visitLocalAndValue(Instruction i, int i1, int i2, Void p) {
    Element ie = new Element(i.getMnemonic());
    ie.setAttr("loc", "" + i1);
    ie.setAttr("num", "" + i2);
    return ie;
}
Also used : Element(xmlkit.XMLKit.Element)

Example 2 with Element

use of xmlkit.XMLKit.Element in project jdk8u_jdk by JetBrains.

the class AnnotationsElementVisitor method instructions.

private Element instructions(Element code, Code_attribute c) {
    Element ielement = new Element("Instructions");
    for (Instruction ins : c.getInstructions()) {
        ielement.add(iv.visit(ins));
    }
    ielement.trimToSize();
    return ielement;
}
Also used : Element(xmlkit.XMLKit.Element) Instruction(com.sun.tools.classfile.Instruction)

Example 3 with Element

use of xmlkit.XMLKit.Element in project jdk8u_jdk by JetBrains.

the class AnnotationsElementVisitor method visitDeprecated.

@Override
public Element visitDeprecated(Deprecated_attribute d, Element p) {
    Element e = new Element(x.getCpString(d.attribute_name_index));
    p.add(e);
    return null;
}
Also used : Element(xmlkit.XMLKit.Element)

Example 4 with Element

use of xmlkit.XMLKit.Element in project jdk8u_jdk by JetBrains.

the class AnnotationsElementVisitor method visitBranch.

@Override
public Element visitBranch(Instruction i, int i1, Void p) {
    Element ie = new Element(i.getMnemonic());
    ie.setAttr("lab", "" + (i.getPC() + i1));
    return ie;
}
Also used : Element(xmlkit.XMLKit.Element)

Example 5 with Element

use of xmlkit.XMLKit.Element in project jdk8u_jdk by JetBrains.

the class AnnotationsElementVisitor method visitConstantPoolRef.

@Override
public Element visitConstantPoolRef(Instruction i, int i1, Void p) {
    Element ie = new Element(i.getMnemonic());
    ie.setAttr("ref", x.getCpString(i1));
    return ie;
}
Also used : Element(xmlkit.XMLKit.Element)

Aggregations

Element (xmlkit.XMLKit.Element)77 ConstantPoolException (com.sun.tools.classfile.ConstantPoolException)8 TypeAnnotation (com.sun.tools.classfile.TypeAnnotation)7 Annotation (com.sun.tools.classfile.Annotation)5 StackMapTable_attribute (com.sun.tools.classfile.StackMapTable_attribute)2 AccessFlags (com.sun.tools.classfile.AccessFlags)1 Attribute (com.sun.tools.classfile.Attribute)1 BootstrapMethods_attribute (com.sun.tools.classfile.BootstrapMethods_attribute)1 CharacterRangeTable_attribute (com.sun.tools.classfile.CharacterRangeTable_attribute)1 ClassFile (com.sun.tools.classfile.ClassFile)1 Code_attribute (com.sun.tools.classfile.Code_attribute)1 DefaultAttribute (com.sun.tools.classfile.DefaultAttribute)1 Field (com.sun.tools.classfile.Field)1 Info (com.sun.tools.classfile.InnerClasses_attribute.Info)1 Instruction (com.sun.tools.classfile.Instruction)1 LineNumberTable_attribute (com.sun.tools.classfile.LineNumberTable_attribute)1 LocalVariableTable_attribute (com.sun.tools.classfile.LocalVariableTable_attribute)1 LocalVariableTypeTable_attribute (com.sun.tools.classfile.LocalVariableTypeTable_attribute)1 Method (com.sun.tools.classfile.Method)1 MethodParameters_attribute (com.sun.tools.classfile.MethodParameters_attribute)1