boolean isArrayStore(InstructionHandle ins) { if (ins == null) { return false; } Instruction i = ins.getInstruction(); return (i instanceof ArrayInstruction && i instanceof StackConsumer); }
/** * Get the <i>i</i>th operand used by given instruction. * * @param ins * the instruction, which must be a StackConsumer * @param cpg * the ConstantPoolGen * @param i * index of operand to get: 0 for the first operand, etc. * @return the <i>i</i>th operand used by the given instruction * @throws DataflowAnalysisException */ public ValueType getOperand(StackConsumer ins, ConstantPoolGen cpg, int i) throws DataflowAnalysisException { int numOperands = ins.consumeStack(cpg); if (numOperands == Constants.UNPREDICTABLE) throw new DataflowAnalysisException("Unpredictable stack consumption in " + ins); return getStackValue((numOperands - 1) - i); }