sd.setOffset(0);
Instruction inst = cr.getInstruction();
DecompilationContext dc = cr.getDecompilationContext();
LocalVariableTableAttribute lvs = dc.getLocalVariableTable();
ConstantPool pool = dc.getConstantPool();
sd.drawIndent();
sd.drawIndent();
sd.drawInstruction(inst.getMnemonic());
Parameters params = inst.getParameters();
for (int i = 0; i < params.getCount(); i++) {
try {
switch (params.getType(i)) {
case TYPE_LOCAL_VARIABLE:
case TYPE_LOCAL_VARIABLE_WIDE:
case TYPE_LOCAL_VARIABLE_READONLY:
if (lvs == null) {
sd.drawDefault(" " + params.getInt(i));
} else {
LocalVariable lv = lvs.getLocalVariable(params.getInt(i), cr.getPosition());
if (lv == null) {
sd.drawDefault(" " + params.getInt(i));
} else {
sd.drawDefault(" " + lv.getName());
}
}
break;
case TYPE_CONSTANT_POOL_METHOD_REF: {
int index = params.getInt(i);
ConstantPoolInfo cpi = pool.get(index);
renderMethodRef(sd, ia, (RefInfo) cpi, index);
break;
}
case TYPE_CONSTANT_POOL_FIELD_REF: {
int index = params.getInt(i);
ConstantPoolInfo cpi = pool.get(index);
renderFieldRef(sd, ia, (RefInfo) cpi, index);
break;
}
case TYPE_CONSTANT_POOL_CLASS: {
int index = params.getInt(i);
ConstantPoolInfo cpi = pool.get(index);
renderClassRef(sd, ia, (ClassInfo) cpi, index);
break;
}
case TYPE_CONSTANT_POOL_CONSTANT: {
int index = params.getInt(i);
ConstantPoolInfo cpi = pool.get(index);
renderConstant(sd, cpi, index);
break;
}
case TYPE_LABEL: {
Label label = (Label) params.getObject(i);