Package edu.umd.cs.findbugs.ba.type

Examples of edu.umd.cs.findbugs.ba.type.TypeFrame


                if (DEBUG) {
                    System.out.println("\tlooking up method for " + instructionHandle + " : " + primaryXMethod);
                }

                Location loc = new Location(instructionHandle, basicBlock);
                TypeFrame typeFrame = typeDataflow.getFactAtLocation(loc);
                // if (primaryXMethod.isAbstract()) continue;
                Set<XMethod> targetSet = null;
                try {

                    if (className.startsWith("[")) {
View Full Code Here


            if (!receiverObjectInstructionSet.get(ins.getOpcode())) {
                return;
            }

            TypeDataflow typeDataflow = classContext.getTypeDataflow(method);
            TypeFrame frame = typeDataflow.getFactAtLocation(location);
            if (frame.isValid()) {
                Type type = frame.getInstance(ins, classContext.getConstantPoolGen());
                if (type instanceof ReferenceType) {
                    propertySet.setProperty(GeneralWarningProperty.RECEIVER_OBJECT_TYPE, type.toString());
                }
            }
        } catch (DataflowAnalysisException e) {
View Full Code Here

            List<WarningWithProperties> stringComparisonList, List<WarningWithProperties> refComparisonList)
                    throws DataflowAnalysisException {

        InstructionHandle handle = location.getHandle();

        TypeFrame frame = typeDataflow.getFactAtLocation(location);
        if (frame.getStackDepth() < 2) {
            throw new DataflowAnalysisException("Stack underflow", methodGen, handle);
        }

        int numSlots = frame.getNumSlots();
        Type lhsType = frame.getValue(numSlots - 2);
        Type rhsType = frame.getValue(numSlots - 1);

        if (lhsType instanceof NullType || rhsType instanceof NullType) {
            return;
        }
        if (lhsType instanceof ReferenceType && rhsType instanceof ReferenceType) {
View Full Code Here

                return;
            }
        }
        String sourceFile = jclass.getSourceFileName();

        TypeFrame frame = typeDataflow.getFactAtLocation(location);
        if (frame.getStackDepth() < 2) {
            throw new DataflowAnalysisException("Stack underflow", methodGen, handle);
        }

        int numSlots = frame.getNumSlots();
        Type lhsType_ = frame.getValue(numSlots - 2);
        Type rhsType_ = frame.getValue(numSlots - 1);

        // Ignore top and bottom values
        if (lhsType_.getType() == T_TOP || lhsType_.getType() == T_BOTTOM || rhsType_.getType() == T_TOP
                || rhsType_.getType() == T_BOTTOM) {
            return;
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.ba.type.TypeFrame

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.