Package edu.umd.cs.findbugs.ba.jsr305

Examples of edu.umd.cs.findbugs.ba.jsr305.TypeQualifierAnnotation


            DataflowCFGPrinter<TypeQualifierValueSet, ForwardTypeQualifierDataflowAnalysis> p = new DataflowCFGPrinter<TypeQualifierValueSet, ForwardTypeQualifierDataflowAnalysis>(
                    forwardDataflow);
            p.print(System.out);
        }

        BackwardTypeQualifierDataflow backwardDataflow = backwardDataflowFactory.getDataflow(typeQualifierValue);

        if (DEBUG_DATAFLOW && (DEBUG_DATAFLOW_MODE.startsWith("backward") || DEBUG_DATAFLOW_MODE.equals("both"))) {
            System.out.println("********* Backwards analysis *********");
            DataflowCFGPrinter<TypeQualifierValueSet, BackwardTypeQualifierDataflowAnalysis> p = new DataflowCFGPrinter<TypeQualifierValueSet, BackwardTypeQualifierDataflowAnalysis>(
                    backwardDataflow);
View Full Code Here


     * .classfile.IAnalysisCache, java.lang.Object)
     */
    @Override
    public BackwardTypeQualifierDataflowFactory analyze(IAnalysisCache analysisCache, MethodDescriptor descriptor)
            throws CheckedAnalysisException {
        return new BackwardTypeQualifierDataflowFactory(descriptor);
    }
View Full Code Here

            System.out.println("  Relevant type qualifiers are " + relevantQualifiers);
        }
        IAnalysisCache analysisCache = Global.getAnalysisCache();
        ForwardTypeQualifierDataflowFactory forwardDataflowFactory = analysisCache.getMethodAnalysis(
                ForwardTypeQualifierDataflowFactory.class, methodDescriptor);
        BackwardTypeQualifierDataflowFactory backwardDataflowFactory = analysisCache.getMethodAnalysis(
                BackwardTypeQualifierDataflowFactory.class, methodDescriptor);
        ValueNumberDataflow vnaDataflow = analysisCache.getMethodAnalysis(ValueNumberDataflow.class, methodDescriptor);

        for (TypeQualifierValue<?> typeQualifierValue : relevantQualifiers) {
View Full Code Here

            }
            ValueNumber next = factAtLocation.getStackValue(1);
            if (next.hasFlag(ValueNumber.CONSTANT_VALUE)) {
                return;
            }
            FlowValue topTQ = forwardsFact.getValue(top);
            FlowValue nextTQ = forwardsFact.getValue(next);
            if (DEBUG) {
                System.out.println("Comparing values at " + loc.toCompactString());
                System.out.println(" Comparing " + topTQ + " and " + nextTQ);
            }
            if (topTQ.equals(nextTQ)) {
View Full Code Here

            Set<SourceSinkInfo> sourceSet = forwardDataflow.getAnalysis().getSourceSinkInfoSet(location);

            for (SourceSinkInfo source : sourceSet) {
                ValueNumber vn = source.getValueNumber();
                TypeQualifierValueSet backwardsFact = backwardDataflow.getFactAtLocation(location);
                FlowValue backwardsFlowValue = backwardsFact.getValue(vn);

                if (!(backwardsFlowValue == FlowValue.ALWAYS || backwardsFlowValue == FlowValue.NEVER)) {
                    continue;
                }
                if (DEBUG) {
                    System.out.println("Checking value source at " + location.toCompactString() + " for " + typeQualifierValue);
                    System.out.println("  back=" + backwardsFact);
                    System.out.println("  source=" + source);
                }

                // Check to see if this warning has already been reported
                // because
                // the dataflow values conflict directly with each other.
                TypeQualifierValueSet forwardsFact = forwardDataflow.getFactAfterLocation(location);
                FlowValue forwardsFlowValue = forwardsFact.getValue(vn);
                if (FlowValue.valuesConflict(typeQualifierValue.isStrictQualifier() && !xMethod.isIdentity(), forwardsFlowValue, backwardsFlowValue)) {
                    continue;
                }

                if (FlowValue.backwardsValueConflictsWithSource(backwardsFlowValue, source, typeQualifierValue, xMethod.isIdentity())) {
View Full Code Here

        Set<ValueNumber> valueNumberSet = new HashSet<ValueNumber>();
        valueNumberSet.addAll(forwardsFact.getValueNumbers());
        valueNumberSet.addAll(backwardsFact.getValueNumbers());

        for (ValueNumber vn : valueNumberSet) {
            FlowValue forward = forwardsFact.getValue(vn);
            FlowValue backward = backwardsFact.getValue(vn);
            if (!FlowValue.valuesConflict(typeQualifierValue.isStrictQualifier() && !xMethod.isIdentity(), forward, backward)) {
                continue;
            }

            if (DEBUG) {
View Full Code Here

            System.out.println("********* Valuenumber analysis *********");
            DataflowCFGPrinter<ValueNumberFrame, ValueNumberAnalysis> p = new DataflowCFGPrinter<ValueNumberFrame, ValueNumberAnalysis>(vnaDataflow);
            p.print(System.out);
        }

        ForwardTypeQualifierDataflow forwardDataflow = forwardDataflowFactory.getDataflow(typeQualifierValue);

        if (DEBUG_DATAFLOW && (DEBUG_DATAFLOW_MODE.startsWith("forward") || DEBUG_DATAFLOW_MODE.equals("both"))) {
            System.out.println("********* Forwards analysis *********");
            DataflowCFGPrinter<TypeQualifierValueSet, ForwardTypeQualifierDataflowAnalysis> p = new DataflowCFGPrinter<TypeQualifierValueSet, ForwardTypeQualifierDataflowAnalysis>(
                    forwardDataflow);
View Full Code Here

     */
    @Override
    public ForwardTypeQualifierDataflowFactory analyze(IAnalysisCache analysisCache, MethodDescriptor descriptor)
            throws CheckedAnalysisException {

        return new ForwardTypeQualifierDataflowFactory(descriptor);
    }
View Full Code Here

        }
        if (DEBUG) {
            System.out.println("  Relevant type qualifiers are " + relevantQualifiers);
        }
        IAnalysisCache analysisCache = Global.getAnalysisCache();
        ForwardTypeQualifierDataflowFactory forwardDataflowFactory = analysisCache.getMethodAnalysis(
                ForwardTypeQualifierDataflowFactory.class, methodDescriptor);
        BackwardTypeQualifierDataflowFactory backwardDataflowFactory = analysisCache.getMethodAnalysis(
                BackwardTypeQualifierDataflowFactory.class, methodDescriptor);
        ValueNumberDataflow vnaDataflow = analysisCache.getMethodAnalysis(ValueNumberDataflow.class, methodDescriptor);
View Full Code Here

            XMethod xmethod = XFactory.createXMethod(classContext.getJavaClass(), method);
            ParameterProperty nonnullParameters = AnalysisContext.currentAnalysisContext().getUnconditionalDerefParamDatabase()
                    .getProperty(xmethod.getMethodDescriptor());
            if (nonnullParameters != null) {
                for (int p : nonnullParameters.iterable()) {
                    TypeQualifierAnnotation directTypeQualifierAnnotation = TypeQualifierApplications
                            .getDirectTypeQualifierAnnotation(xmethod, p, nonnullTypeQualifierValue);
                    if (directTypeQualifierAnnotation != null && directTypeQualifierAnnotation.when == When.UNKNOWN) {
                        //
                        // The LocalVariableAnnotation is constructed using the
                        // local variable
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.ba.jsr305.TypeQualifierAnnotation

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.