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

项目:findbugs-all-the-bugs    文件:AssertionMethods.java   
public boolean isAssertionHandle(InstructionHandle handle, ConstantPoolGen cpg) {
    Instruction ins = handle.getInstruction();
    if (isAssertionInstruction(ins, cpg))
        return true;

    if (ins instanceof SIPUSH) {
        int v = ((SIPUSH) ins).getValue().intValue();
        if (v == 500) {
            Instruction next = handle.getNext().getInstruction();
            if (next instanceof INVOKEINTERFACE) {
                INVOKEINTERFACE iInterface = (INVOKEINTERFACE) next;
                String className = iInterface.getClassName(cpg);
                String fieldName = iInterface.getMethodName(cpg);
                if (className.equals("javax.servlet.http.HttpServletResponse") && fieldName.equals("setStatus"))
                    return true;

            }
        }
    }
    return false;
}
项目:FindBug-for-Domino-Designer    文件:AssertionMethods.java   
public boolean isAssertionHandle(InstructionHandle handle, ConstantPoolGen cpg) {
    Instruction ins = handle.getInstruction();
    if (isAssertionInstruction(ins, cpg))
        return true;

    if (ins instanceof SIPUSH) {
        int v = ((SIPUSH) ins).getValue().intValue();
        if (v == 500) {
            Instruction next = handle.getNext().getInstruction();
            if (next instanceof INVOKEINTERFACE) {
                INVOKEINTERFACE iInterface = (INVOKEINTERFACE) next;
                String className = iInterface.getClassName(cpg);
                String fieldName = iInterface.getMethodName(cpg);
                if (className.equals("javax.servlet.http.HttpServletResponse") && fieldName.equals("setStatus"))
                    return true;

            }
        }
    }
    return false;
}
项目:Android_Code_Arbiter    文件:TaintFrameModelingVisitor.java   
@Override
public void visitSIPUSH(SIPUSH obj) {
    Taint taint = new Taint(Taint.State.SAFE);
    // assume each pushed short is a char (for non-ASCII characters)
    taint.setConstantValue(String.valueOf((char) obj.getValue().shortValue()));
    getFrame().pushValue(taint);
}
项目:findbugs-all-the-bugs    文件:ConstantFrameModelingVisitor.java   
@Override
public void visitSIPUSH(SIPUSH obj) {
    Number value = obj.getValue();
    Constant c = new Constant(value);
    getFrame().pushValue(c);
}
项目:FindBug-for-Domino-Designer    文件:ConstantFrameModelingVisitor.java   
@Override
public void visitSIPUSH(SIPUSH obj) {
    Number value = obj.getValue();
    Constant c = new Constant(value);
    getFrame().pushValue(c);
}