Package edu.umd.cs.findbugs.classfile.analysis

Examples of edu.umd.cs.findbugs.classfile.analysis.AnnotationValue


            try {
                if (annotationClass.equals(googleNullable)
                        || annotationClass.equals(eclipseNullable)
                        || annotationClass.equals(intellijNullable)) {
                    resolveTypeQualifierNicknames(new AnnotationValue(JSR305NullnessAnnotations.CHECK_FOR_NULL), result, onStack);
                    return;
                }
                if (annotationClass.equals(eclipseNonNull) || annotationClass.equals(eclipseNonNullByDefault)) {
                    resolveTypeQualifierNicknames(new AnnotationValue(JSR305NullnessAnnotations.NONNULL), result, onStack);
                    return;
                }

                XClass c = Global.getAnalysisCache().getClassAnalysis(XClass.class, annotationClass);
                if (c.getAnnotationDescriptors().contains(typeQualifierNickname)) {
View Full Code Here


    private static void resolveTypeQualifierDefaults(AnnotationValue value, ElementType defaultFor,
            LinkedList<AnnotationValue> result) {

        try {
            XClass c = Global.getAnalysisCache().getClassAnalysis(XClass.class, value.getAnnotationClass());
            AnnotationValue defaultAnnotation = c.getAnnotation(typeQualifierDefault);
            if (defaultAnnotation == null) {
                return;
            }
            for (Object o : (Object[]) defaultAnnotation.getValue("value")) {
                if (o instanceof EnumValue) {
                    EnumValue e = (EnumValue) o;
                    if (e.desc.equals(elementTypeDescriptor) && e.value.equals(defaultFor.name())) {
                        for (ClassDescriptor d : c.getAnnotationDescriptors()) {
                            if (!d.equals(typeQualifierDefault)) {
View Full Code Here

        XMethod overrides = Lookup.findSuperImplementorAsXMethod(getThisClass(), getMethodName(), getMethodSig(), bugReporter);

        if (overrides == null) {
            return;
        }
        AnnotationValue annotation = overrides.getAnnotation(mustOverrideAnnotation);
        if (annotation == null) {
            return;
        }
        sawCallToSuper = false;
        super.visit(code);
View Full Code Here

        }

    }

    private void check(XClass xclass, ClassDescriptor annotation, boolean expectWarnings, int priority) {
        AnnotationValue expect = xclass.getAnnotation(annotation);
        if (expect == null) {
            return;
        }
        if (DEBUG) {
            System.out.println("*** Found " + annotation + " annotation on " + xclass);
View Full Code Here

        Collection<BugInstance> warnings = warningsByClass.get(descriptor);
        check(expect, descriptor, warnings, expectWarnings, priority, descriptor);
    }

    private void check(XMethod xmethod, ClassDescriptor annotation, boolean expectWarnings, int priority) {
        AnnotationValue expect = xmethod.getAnnotation(annotation);
        if (expect == null) {
            return;
        }
        if (DEBUG) {
            System.out.println("*** Found " + annotation + " annotation on " + xmethod);
View Full Code Here

        Collection<BugInstance> warnings = warningsByMethod.get(descriptor);
        check(expect, descriptor, warnings, expectWarnings, priority, descriptor.getClassDescriptor());
    }

    private void check(XField xfield, ClassDescriptor annotation, boolean expectWarnings, int priority) {
        AnnotationValue expect = xfield.getAnnotation(annotation);
        if (expect == null) {
            return;
        }

        if (DEBUG) {
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.classfile.analysis.AnnotationValue

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.