/** * Set the local variable object this instruction * operates on. This method will set both the type and local index * of this instruction from the given local variable. * * @return this instruction, for method chaining */ public LocalVariableInstruction setLocalVariable(LocalVariable local) { if (local == null) return setLocal(-1); String type = local.getTypeName(); if (type != null) setType(type); return setLocal(local.getLocal()); }
/** * Set the local variable object this instruction * operates on. This method will set both the type and local index * of this instruction from the given local variable. * * @return this instruction, for method chaining */ public LocalVariableInstruction setLocalVariable(LocalVariable local) { if (local == null) return setLocal(-1); String type = local.getTypeName(); if (type != null) setType(type); return setLocal(local.getLocal()); }
void read(Instruction orig) { super.read(orig); setLocal(((LocalVariableInstruction) orig).getLocal()); }
void read(Instruction orig) { super.read(orig); setLocal(((LocalVariableInstruction) orig).getLocal()); }
/** * Set the method parameter that this instruction operates on. This * will set both the local index and the type of the instruction based * on the current method parameters. */ public LocalVariableInstruction setParam(int param) { int local = getCode().getLocalsIndex(param); if (local != -1) { BCMethod method = getCode().getMethod(); setType(method.getParamNames()[param]); } return setLocal(local); }
/** * Set the method parameter that this instruction operates on. This * will set both the local index and the type of the instruction based * on the current method parameters. */ public LocalVariableInstruction setParam(int param) { int local = getCode().getLocalsIndex(param); if (local != -1) { BCMethod method = getCode().getMethod(); setType(method.getParamNames()[param]); } return setLocal(local); }