Java Code Examples for com.sun.tools.classfile.ConstantPoolException#printStackTrace()

The following examples show how to use com.sun.tools.classfile.ConstantPoolException#printStackTrace() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@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;
}
 
Example 2
@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;
}
 
Example 3
@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;
}
 
Example 4
@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;
}
 
Example 5
@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;
}
 
Example 6
@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;
}
 
Example 7
@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;
}
 
Example 8
@Override
public String visitFieldref(CONSTANT_Fieldref_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);
        } catch (ConstantPoolException ex) {
            ex.printStackTrace();
        }
    }
    return value;
}
 
Example 9
@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);
        } catch (ConstantPoolException ex) {
            ex.printStackTrace();
        }
    }
    return value;
}
 
Example 10
@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);
        } catch (ConstantPoolException ex) {
            ex.printStackTrace();
        }
    }
    return value;
}
 
Example 11
@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);
        } catch (ConstantPoolException ex) {
            ex.printStackTrace();
        }
    }
    return value;
}
 
Example 12
@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;
}
 
Example 13
@Override
public String visitFieldref(CONSTANT_Fieldref_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_Fieldref",
                      new String[]{"id", p.toString()},
                      value));
        } catch (ConstantPoolException ex) {
            ex.printStackTrace();
        }
    }
    return value;
}
 
Example 14
@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;
}
 
Example 15
@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;
}
 
Example 16
@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;
}
 
Example 17
@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;
}
 
Example 18
@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);
        } catch (ConstantPoolException ex) {
            ex.printStackTrace();
        }
    }
    return value;
}
 
Example 19
@Override
public String visitInvokeDynamic(CONSTANT_InvokeDynamic_info c, Integer p) {

    String value = slist.get(p);
    if (value == null) {
        try {
            value = bsmMap.get(c.bootstrap_method_attr_index) + " "
                    + visit(cfpool.get(c.name_and_type_index), c.name_and_type_index);
            slist.set(p, value);
        } catch (ConstantPoolException ex) {
            ex.printStackTrace();
        }
    }
    return value;
}
 
Example 20
@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);
        } catch (ConstantPoolException ex) {
            ex.printStackTrace();
        }
    }
    return value;
}