Search in sources :

Example 1 with ConstantPoolException

use of com.sun.tools.classfile.ConstantPoolException in project jdk8u_jdk by JetBrains.

the class AnnotationsElementVisitor method visitInvokeDynamic.

@Override
public String visitInvokeDynamic(CONSTANT_InvokeDynamic_info c, Integer p) {
    String value = slist.get(p);
    if (value == null) {
        try {
            value = bsmlist.get(c.bootstrap_method_attr_index) + " " + visit(cfpool.get(c.name_and_type_index), c.name_and_type_index);
            slist.set(p, value);
            xpool.add(new Element("CONSTANT_InvokeDynamic", new String[] { "id", p.toString() }, value));
        } catch (ConstantPoolException ex) {
            ex.printStackTrace();
        }
    }
    return value;
}
Also used : Element(xmlkit.XMLKit.Element) ConstantPoolException(com.sun.tools.classfile.ConstantPoolException)

Example 2 with ConstantPoolException

use of com.sun.tools.classfile.ConstantPoolException in project jdk8u_jdk by JetBrains.

the class AnnotationsElementVisitor method visitMethodref.

@Override
public String visitMethodref(CONSTANT_Methodref_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_Methodref", new String[] { "id", p.toString() }, value));
        } catch (ConstantPoolException ex) {
            ex.printStackTrace();
        }
    }
    return value;
}
Also used : Element(xmlkit.XMLKit.Element) ConstantPoolException(com.sun.tools.classfile.ConstantPoolException)

Example 3 with ConstantPoolException

use of com.sun.tools.classfile.ConstantPoolException in project jdk8u_jdk by JetBrains.

the class AnnotationsElementVisitor method visitMethodType.

@Override
public String visitMethodType(CONSTANT_MethodType_info c, Integer p) {
    String value = slist.get(p);
    if (value == null) {
        try {
            value = visit(cfpool.get(c.descriptor_index), c.descriptor_index);
            slist.set(p, value);
            xpool.add(new Element("CONSTANT_MethodType", new String[] { "id", p.toString() }, value));
        } catch (ConstantPoolException ex) {
            ex.printStackTrace();
        }
    }
    return value;
}
Also used : Element(xmlkit.XMLKit.Element) ConstantPoolException(com.sun.tools.classfile.ConstantPoolException)

Example 4 with ConstantPoolException

use of com.sun.tools.classfile.ConstantPoolException in project jdk8u_jdk by JetBrains.

the class AnnotationsElementVisitor method visitClass.

@Override
public String visitClass(CONSTANT_Class_info c, Integer p) {
    String value = slist.get(p);
    if (value == null) {
        try {
            value = visit(cfpool.get(c.name_index), c.name_index);
            slist.set(p, value);
            xpool.add(new Element("CONSTANT_Class", new String[] { "id", p.toString() }, value));
        } catch (ConstantPoolException ex) {
            ex.printStackTrace();
        }
    }
    return value;
}
Also used : Element(xmlkit.XMLKit.Element) ConstantPoolException(com.sun.tools.classfile.ConstantPoolException)

Example 5 with ConstantPoolException

use of com.sun.tools.classfile.ConstantPoolException 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;
}
Also used : Element(xmlkit.XMLKit.Element) ConstantPoolException(com.sun.tools.classfile.ConstantPoolException)

Aggregations

ConstantPoolException (com.sun.tools.classfile.ConstantPoolException)20 Element (xmlkit.XMLKit.Element)8 ConstantPool (com.sun.tools.classfile.ConstantPool)6 Descriptor (com.sun.tools.classfile.Descriptor)5 InvalidDescriptor (com.sun.tools.classfile.Descriptor.InvalidDescriptor)5 AccessFlags (com.sun.tools.classfile.AccessFlags)3 Attribute (com.sun.tools.classfile.Attribute)3 Signature_attribute (com.sun.tools.classfile.Signature_attribute)3 Type (com.sun.tools.classfile.Type)3 ArrayType (com.sun.tools.classfile.Type.ArrayType)3 ClassSigType (com.sun.tools.classfile.Type.ClassSigType)3 ClassType (com.sun.tools.classfile.Type.ClassType)3 MethodType (com.sun.tools.classfile.Type.MethodType)3 SimpleType (com.sun.tools.classfile.Type.SimpleType)3 TypeParamType (com.sun.tools.classfile.Type.TypeParamType)3 WildcardType (com.sun.tools.classfile.Type.WildcardType)3 ClassFile (com.sun.tools.classfile.ClassFile)2 Method (com.sun.tools.classfile.Method)2 Signature (com.sun.tools.classfile.Signature)2 SourceFile_attribute (com.sun.tools.classfile.SourceFile_attribute)2