Examples of XMethodParameter


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

                XField f = pu.getNonNullField();
                if (f != null) {
                    storedField = FieldAnnotation.fromXField(f);
                    bugType = "NP_STORE_INTO_NONNULL_FIELD";
                } else {
                    XMethodParameter mp = pu.getNonNullParameter();
                    if (mp != null) {
                        invokedXMethod = mp.getMethod();
                        for (Location derefLoc : derefLocationSet) {
                            if (safeCallToPrimateParseMethod(invokedXMethod, derefLoc)) {
                                return;
                            }
                        }
                        invokedMethod = MethodAnnotation.fromXMethod(mp.getMethod());
                        if (mp.getParameterNumber() == 0
                                && TypeQualifierNullnessAnnotationDatabase.assertsFirstParameterIsNonnull(invokedXMethod)) {
                            return;
                        }
                        parameterNumber = mp.getParameterNumber();
                        bugType = "NP_NULL_PARAM_DEREF";
                    }
                }
            }
        }
View Full Code Here

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

    public static PointerUsageRequiringNonNullValue getPassedAsNonNullParameter(final XMethod m, final int param) {
        return new PointerUsageRequiringNonNullValue() {
            @Override
            public @CheckForNull
            XMethodParameter getNonNullParameter() {
                return new XMethodParameter(m, param);
            }

            @Override
            public String getDescription() {
                return "SOURCE_LINE_INVOKED";
View Full Code Here

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

            int slot = paramShift;
            for (int paramIndex = 0; paramIndex < argumentTypes.length; paramIndex++) {
                IsNullValue value;

                XMethodParameter methodParameter = new XMethodParameter(xm, paramIndex);
                NullnessAnnotation n = db.getResolvedAnnotation(methodParameter, false);
                if (n == NullnessAnnotation.CHECK_FOR_NULL) {
                    // Parameter declared @CheckForNull
                    value = IsNullValue.parameterMarkedAsMightBeNull(methodParameter);
                } else if (n == NullnessAnnotation.NONNULL) {
View Full Code Here

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

            return;
        }

        XMethod xmethod = XFactory.createXMethod(this);

        XMethodParameter xparameter = new XMethodParameter(xmethod, p);

        database.addDirectAnnotation(xparameter, NullnessAnnotation.UNKNOWN_NULLNESS);

    }
View Full Code Here

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

        XMethod xmethod = XFactory.createXMethod(this);
        if (DEBUG) {
            System.out.println("Parameter " + p + " @" + annotationClass.substring(annotationClass.lastIndexOf('/') + 1) + " in "
                    + xmethod.toString());
        }
        XMethodParameter xparameter = new XMethodParameter(xmethod, p);

        database.addDirectAnnotation(xparameter, n);

    }
View Full Code Here

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

            }

            TypeQualifierAnnotation tqa = null;

            if (o instanceof XMethodParameter) {
                XMethodParameter param = (XMethodParameter) o;

                tqa = TypeQualifierApplications.getEffectiveTypeQualifierAnnotation(param.getMethod(),
                        param.getParameterNumber(), nonnullTypeQualifierValue);
            } else if (o instanceof XMethod || o instanceof XField) {
                tqa = TypeQualifierApplications.getEffectiveTypeQualifierAnnotation((AnnotatedObject) o,
                        nonnullTypeQualifierValue);
            }
View Full Code Here

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

            }

            TypeQualifierAnnotation tqa = null;

            if (o instanceof XMethodParameter) {
                XMethodParameter param = (XMethodParameter) o;
                tqa = TypeQualifierApplications.getDirectTypeQualifierAnnotation(param.getMethod(),
                        param.getParameterNumber(), nonnullTypeQualifierValue);
            } else if (o instanceof XMethod || o instanceof XField) {
                tqa = TypeQualifierApplications.getEffectiveTypeQualifierAnnotation((AnnotatedObject) o,
                        nonnullTypeQualifierValue);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.