List of usage examples for org.objectweb.asm ClassReader readConst
public Object readConst(final int constantPoolEntryIndex, final char[] charBuffer)
From source file:net.orfjackal.retrolambda.test.TestUtil.java
License:Open Source License
public static void visitConstantPool(ClassReader reader, ConstantPoolVisitor visitor) { char[] buf = new char[reader.getMaxStringLength()]; for (int item = 0; item < reader.getItemCount(); item++) { try {/*from w w w . j a va 2 s .com*/ Object constant = reader.readConst(item, buf); visitor.visit(item, constant); } catch (Exception e) { // XXX: constant pool entry which is a Methodref, InvokeDynamic or similar non-plain constant // FIXME: readConst throws ArrayIndexOutOfBoundsException nearly all the time; how to use it??? //e.printStackTrace(); } } }