public int getOperandCount() { final Object operand = _operand; if (operand == null) { return 0; } if (ArrayUtilities.isArray(operand)) { return Array.getLength(operand); } return 1; }
public int getOperandCount() { final Object operand = _operand; if (operand == null) { return 0; } if (ArrayUtilities.isArray(operand)) { return Array.getLength(operand); } return 1; }
public int getOperandCount() { final Object operand = _operand; if (operand == null) { return 0; } if (ArrayUtilities.isArray(operand)) { return Array.getLength(operand); } return 1; }
@SuppressWarnings("unchecked") public <T> T getOperand(final int index) { final Object operand = _operand; if (ArrayUtilities.isArray(operand)) { VerifyArgument.inRange(0, Array.getLength(operand) - 1, index, "index"); return (T) Array.get(operand, index); } else { VerifyArgument.inRange(0, 0, index, "index"); return (T) operand; } }
@SuppressWarnings("unchecked") public <T> T getOperand(final int index) { final Object operand = _operand; if (ArrayUtilities.isArray(operand)) { VerifyArgument.inRange(0, Array.getLength(operand) - 1, index, "index"); return (T) Array.get(operand, index); } else { VerifyArgument.inRange(0, 0, index, "index"); return (T) operand; } }
@SuppressWarnings("unchecked") public <T> T getOperand(final int index) { final Object operand = _operand; if (ArrayUtilities.isArray(operand)) { VerifyArgument.inRange(0, Array.getLength(operand) - 1, index, "index"); return (T) Array.get(operand, index); } else { VerifyArgument.inRange(0, 0, index, "index"); return (T) operand; } }
@Override @SuppressWarnings("CloneDoesntCallSuperClone") public Instruction clone() { final Instruction copy = new Instruction(_opCode, (Object) null); copy._offset = _offset; copy._label = _label != null ? new Label(_label.getIndex()) : null; if (ArrayUtilities.isArray(_operand)) { copy._operand = ((Object[]) _operand).clone(); } else { copy._operand = _operand; } return copy; }
@Override @SuppressWarnings("CloneDoesntCallSuperClone") public Instruction clone() { final Instruction copy = new Instruction(_opCode, (Object) null); copy._offset = _offset; copy._label = _label != null ? new Label(_label.getIndex()) : null; if (ArrayUtilities.isArray(_operand)) { copy._operand = ((Object[]) _operand).clone(); } else { copy._operand = _operand; } return copy; }
@Override @SuppressWarnings("CloneDoesntCallSuperClone") public Instruction clone() { final Instruction copy = new Instruction(_opCode, (Object) null); copy._offset = _offset; copy._label = _label != null ? new Label(_label.getIndex()) : null; if (ArrayUtilities.isArray(_operand)) { copy._operand = ((Object[]) _operand).clone(); } else { copy._operand = _operand; } return copy; }