Java 类org.apache.bcel.generic.StackConsumer 实例源码

项目:cashmere    文件:Cashmerec.java   
boolean isArrayStore(InstructionHandle ins) {
    if (ins == null) {
        return false;
    }
    Instruction i = ins.getInstruction();
    return (i instanceof ArrayInstruction && i instanceof StackConsumer);
}
项目:findbugs-all-the-bugs    文件:Frame.java   
/**
 * 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);
}
项目:FindBug-for-Domino-Designer    文件:Frame.java   
/**
 * 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);
}