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

项目:Android_Code_Arbiter    文件:TaintFrameModelingVisitor.java   
@Override
public void visitBIPUSH(BIPUSH obj) {
    Taint taint = new Taint(Taint.State.SAFE);
    // assume each pushed byte is a char
    taint.setConstantValue(String.valueOf((char) obj.getValue().byteValue()));
    getFrame().pushValue(taint);
}
项目:cashmere    文件:Cashmerec.java   
InstructionHandle insertTypecheckCode(MethodGen m, InstructionList il,
    InstructionHandle pos, int spawnId, int exceptionPos) {
    ArrayList<CodeExceptionGen> catches = mtab.getCatchTypes(m, spawnId);

    InstructionHandle[] jumpTargets = new InstructionHandle[catches.size() + 1];

    BranchHandle[] jumps = new BranchHandle[catches.size()];

    for (int i = 0; i < catches.size(); i++) {
        CodeExceptionGen e = catches.get(i);
        ObjectType type = e.getCatchType();
        InstructionHandle catchTarget = e.getHandlerPC();

        jumpTargets[i] = il.insert(pos, new ALOAD(exceptionPos));
        il.insert(pos, new INSTANCEOF(cpg.addClass(type)));
        il.insert(pos, new BIPUSH((byte) 1));
        jumps[i] = il.insert(pos, new IF_ICMPNE(null));
        il.insert(pos, new ALOAD(exceptionPos));
        il.insert(pos, ins_f.createCheckCast(type));
        il.insert(pos, new GOTO(catchTarget));
    }

    InstructionHandle t = il.insert(pos, new ALOAD(exceptionPos));
    il.insert(pos, new ATHROW());

    jumpTargets[catches.size()] = t;

    for (int i = 0; i < catches.size(); i++) {
        jumps[i].setTarget(jumpTargets[i + 1]);
    }

    return pos;
}
项目:cn1    文件:JavaByteCodeOutputProcess.java   
@SuppressWarnings("unused")
// Called using reflection
private Instruction createInstructionBipush(Element inst) {
    byte val = (byte) Integer.parseInt(inst.getAttributeValue("value"));
    return new BIPUSH(val);
}
项目:findbugs-all-the-bugs    文件:ConstantFrameModelingVisitor.java   
@Override
public void visitBIPUSH(BIPUSH obj) {
    Number value = obj.getValue();
    Constant c = new Constant(value);
    getFrame().pushValue(c);
}
项目:FindBug-for-Domino-Designer    文件:ConstantFrameModelingVisitor.java   
@Override
public void visitBIPUSH(BIPUSH obj) {
    Number value = obj.getValue();
    Constant c = new Constant(value);
    getFrame().pushValue(c);
}