/** * Return the local variable object this instruction * operates on, or null if none. * * @see LocalVariableTable#getLocalVariable(int) */ public LocalVariable getLocalVariable() { LocalVariableTable table = getCode().getLocalVariableTable(false); if (table == null) return null; return table.getLocalVariable(getLocal()); }
/** * Return the local variable object this instruction * operates on, or null if none. * * @see LocalVariableTable#getLocalVariable(int) */ public LocalVariable getLocalVariable() { LocalVariableTable table = getCode().getLocalVariableTable(false); if (table == null) return null; return table.getLocalVariable(getLocal()); }
void read(DataInput in, int length) throws IOException { _maxStack = in.readUnsignedShort(); _maxLocals = in.readUnsignedShort(); readCode(in, in.readInt()); _handlers.clear(); int exceptionCount = in.readUnsignedShort(); ExceptionHandler excep; for (int i = 0; i < exceptionCount; i++) { excep = addExceptionHandler(); excep.read(in); excep.updateTargets(); } readAttributes(in); // setup local variable markers LocalVariableTable locals = getLocalVariableTable(false); if (locals != null) locals.updateTargets(); // setup local variable markers LocalVariableTypeTable localTypes = getLocalVariableTypeTable(false); if (localTypes != null) localTypes.updateTargets(); // setup line number markers LineNumberTable lines = getLineNumberTable(false); if (lines != null) lines.updateTargets(); }
void read(DataInput in, int length) throws IOException { _maxStack = in.readUnsignedShort(); _maxLocals = in.readUnsignedShort(); readCode(in, in.readInt()); _handlers.clear(); int exceptionCount = in.readUnsignedShort(); ExceptionHandler excep; for (int i = 0; i < exceptionCount; i++) { excep = addExceptionHandler(); excep.read(in); excep.updateTargets(); } readAttributes(in); // setup local variable markers LocalVariableTable locals = getLocalVariableTable(false); if (locals != null) locals.updateTargets(); // setup local variable markers LocalVariableTypeTable localTypes = getLocalVariableTypeTable(false); if (localTypes != null) localTypes.updateTargets(); // setup line number markers LineNumberTable lines = getLineNumberTable(false); if (lines != null) lines.updateTargets(); }
private void replaceTarget(Instruction orig, Instruction replace) { for (CodeEntry entry = _head.next; entry != _tail; entry = entry.next) { if (entry instanceof InstructionPtr) ((InstructionPtr) entry).replaceTarget(orig, replace); } // update the ExceptionHandler pointers ExceptionHandler[] handlers = getExceptionHandlers(); for (int i = 0; i < handlers.length; i++) handlers[i].replaceTarget(orig, replace); // update LineNumber pointers LineNumberTable lineNumbers = getLineNumberTable(false); if (lineNumbers != null) lineNumbers.replaceTarget(orig, replace); // update LocalVariable pointers LocalVariableTable variables = getLocalVariableTable(false); if (variables != null) variables.replaceTarget(orig, replace); // update LocalVariableType pointers LocalVariableTypeTable types = getLocalVariableTypeTable(false); if (types != null) types.replaceTarget(orig, replace); } }
private void replaceTarget(Instruction orig, Instruction replace) { for (CodeEntry entry = _head.next; entry != _tail; entry = entry.next) { if (entry instanceof InstructionPtr) ((InstructionPtr) entry).replaceTarget(orig, replace); } // update the ExceptionHandler pointers ExceptionHandler[] handlers = getExceptionHandlers(); for (int i = 0; i < handlers.length; i++) handlers[i].replaceTarget(orig, replace); // update LineNumber pointers LineNumberTable lineNumbers = getLineNumberTable(false); if (lineNumbers != null) lineNumbers.replaceTarget(orig, replace); // update LocalVariable pointers LocalVariableTable variables = getLocalVariableTable(false); if (variables != null) variables.replaceTarget(orig, replace); // update LocalVariableType pointers LocalVariableTypeTable types = getLocalVariableTypeTable(false); if (types != null) types.replaceTarget(orig, replace); } }
LocalVariableTable locals = getLocalVariableTable(false); if (locals != null) locals.updateTargets();
LocalVariableTable locals = getLocalVariableTable(false); if (locals != null) locals.updateTargets();