Package edu.umd.cs.findbugs.ba

Examples of edu.umd.cs.findbugs.ba.NullnessAnnotation


            } else if (o instanceof XMethod || o instanceof XField) {
                tqa = TypeQualifierApplications.getEffectiveTypeQualifierAnnotation((AnnotatedObject) o,
                        nonnullTypeQualifierValue);
            }

            NullnessAnnotation result = toNullnessAnnotation(tqa);
            if (DEBUG) {
                if (result == null) {
                    System.out.println("   ===> not found");
                } else {
                    System.out.println("   ===> " + tqa + "/" + result.toString() );
                }
            }
            return result;
        } finally {
            profiler.end(this.getClass());
View Full Code Here


        profiler.start(this.getClass());
        try {
            TypeQualifierAnnotation tqa
            = TypeQualifierApplications.getInheritedTypeQualifierAnnotation(m,
                    parameter, nonnullTypeQualifierValue);
            NullnessAnnotation result = toNullnessAnnotation(tqa);
            return result;
        } finally {
            profiler.end(this.getClass());
        }
    }
View Full Code Here

        Profiler profiler = Global.getAnalysisCache().getProfiler();
        profiler.start(this.getClass());
        try {
            TypeQualifierAnnotation tqa
            = TypeQualifierApplications.getInheritedTypeQualifierAnnotation(m, nonnullTypeQualifierValue);
            NullnessAnnotation result = toNullnessAnnotation(tqa);
            return result;
        } finally {
            profiler.end(this.getClass());
        }
    }
View Full Code Here

            } else if (o instanceof XMethod || o instanceof XField) {
                tqa = TypeQualifierApplications.getEffectiveTypeQualifierAnnotation((AnnotatedObject) o,
                        nonnullTypeQualifierValue);
            }

            NullnessAnnotation result = toNullnessAnnotation(tqa);
            if (DEBUG) {
                if (result == null) {
                    System.out.println("   ===> not found");
                } else {
                    System.out.println("   ===> " + tqa + "/" + result.toString() );
                }
            }
            return result;
        } finally {
            profiler.end(this.getClass());
View Full Code Here

        XField field = XFactory.createXField(fieldIns, methodGen.getConstantPool());
        char firstChar = field.getSignature().charAt(0);
        if (firstChar != 'L' && firstChar != '[') {
            return;
        }
        NullnessAnnotation resolvedAnnotation = database.getResolvedAnnotation(field, true);
        if (resolvedAnnotation == NullnessAnnotation.NONNULL) {
            IsNullValueFrame invFrame = invDataflow.getFactAtLocation(location);
            if (!invFrame.isValid()) {
                return;
            }
View Full Code Here

    static boolean containsCheckForNull(@CheckForNull List<AnnotationNode> methodAnnotations) {
        if (methodAnnotations == null) {
            return false;
        }
        for (AnnotationNode annotation : methodAnnotations) {
            NullnessAnnotation nullness = getNullness(annotation.desc);
            if (nullness == CHECK_FOR_NULL) {
                return true;
            }
        }
        return false;
View Full Code Here

            List<AnnotationNode> annotations = parameterAnnotations[i];
            if (annotations == null) {
                continue;
            }
            for (AnnotationNode annotation : annotations) {
                NullnessAnnotation nullness = getNullness(annotation.desc);
                if (nullness == null || nullness == CHECK_FOR_NULL) {
                    continue;
                }
                nonNullParameter.put(i, nullness);
            }
View Full Code Here

        return Parser.parse(ClassName.toDottedClassName(substring));
    }

    static boolean containsNullness(Collection<AnnotationValue> annotations, NullnessAnnotation nullness) {
        for (AnnotationValue annotation : annotations) {
            NullnessAnnotation check = Parser.parse(annotation.getAnnotationClass().getDottedClassName());
            if (check == nullness) {
                return true;
            }
        }
        return false;
View Full Code Here

    static boolean containsCheckForNull(@CheckForNull List<AnnotationNode> methodAnnotations) {
        if (methodAnnotations == null) {
            return false;
        }
        for (AnnotationNode annotation : methodAnnotations) {
            NullnessAnnotation nullness = getNullness(annotation.desc);
            if (nullness == CHECK_FOR_NULL) {
                return true;
            }
        }
        return false;
View Full Code Here

            List<AnnotationNode> annotations = parameterAnnotations[i];
            if (annotations == null) {
                continue;
            }
            for (AnnotationNode annotation : annotations) {
                NullnessAnnotation nullness = getNullness(annotation.desc);
                if (nullness == null || nullness == CHECK_FOR_NULL) {
                    continue;
                }
                nonNullParameter.put(i, nullness);
            }
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.ba.NullnessAnnotation

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.