* Get an InstructionList, that represents a byte-code of this method.
*
* @return InstructionList
*/
public InstructionList getInstructionList() {
CodeAttribute ca = null;
if (instructions == null) {
ca = (CodeAttribute)getAttribute("Code");
if (ca == null) {
return null;
}
byte[] byteCode = ca.getByteCode();
instructions = new InstructionList(byteCode,
method.getConstantPool());
instructions.setDeclaringMethod(this);
if (true/* configurable by jiapi.properties */) {
// create private representation of
// line number table, so that we can update
// its offsets, when class is instrumented
lineNumberTable = new LinkedList();
LineNumberTableAttribute lnta = (LineNumberTableAttribute)ca.getAttribute(LineNumberTableAttribute.ATTRIBUTE_NAME);
if (lnta != null) {
List entries = lnta.getEntries();
Iterator i = entries.iterator();
while(i.hasNext()) {
LineNumberTableAttribute.Entry entry =
(LineNumberTableAttribute.Entry)i.next();
Instruction ins =
instructions.instructionAtOffset(entry.getStartPc());
lineNumberTable.add(new LNTableEntry(entry, ins));
}
}
else {
//System.out.println("ERROR: could not get line number table");
}
}
this.exceptionTable = new LinkedList();
List eTable = ca.getExceptionTable();
if (eTable != null) {
Iterator i = eTable.iterator();
while(i.hasNext()) {
CodeAttribute.ExceptionTableEntry entry =