int pc = codeAttr.code_length;
writeLocalVariables(pc, NoteKind.END);
}
public void writeLocalVariables(int pc, NoteKind kind) {
ConstantPool constant_pool = classWriter.getClassFile().constant_pool;
String indent = space(2); // get from Options?
List<LocalVariableTypeTable_attribute.Entry> entries = pcMap.get(pc);
if (entries != null) {
for (ListIterator<LocalVariableTypeTable_attribute.Entry> iter =
entries.listIterator(kind == NoteKind.END ? entries.size() : 0);
kind == NoteKind.END ? iter.hasPrevious() : iter.hasNext() ; ) {
LocalVariableTypeTable_attribute.Entry entry =
kind == NoteKind.END ? iter.previous() : iter.next();
if (kind.match(entry, pc)) {
print(indent);
print(kind.text);
print(" generic local ");
print(entry.index);
print(" // ");
Descriptor d = new Signature(entry.signature_index);
try {
print(d.getFieldType(constant_pool).toString().replace("/", "."));
} catch (InvalidDescriptor e) {
print(report(e));
} catch (ConstantPoolException e) {
print(report(e));
}
print(" ");
try {
print(constant_pool.getUTF8Value(entry.name_index));
} catch (ConstantPoolException e) {
print(report(e));
}
println();
}