public MethodAnnotation getMethodAnnotation() { return MethodAnnotation.fromXMethod(method); }
/** * Add a MethodAnnotation from an XMethod. * * @param xmethod * the XMethod * @return this object */ @Nonnull public BugInstance addMethod(XMethod xmethod) { addMethod(MethodAnnotation.fromXMethod(xmethod)); return this; }
public static @CheckForNull BugAnnotation getFieldOrMethodValueSource(@CheckForNull OpcodeStack.Item item) { if (item == null) { return null; } XField xField = item.getXField(); if (xField != null) { FieldAnnotation a = FieldAnnotation.fromXField(xField); a.setDescription(FieldAnnotation.LOADED_FROM_ROLE); return a; } XMethod xMethod = item.getReturnValueOf(); if (xMethod != null) { MethodAnnotation a = MethodAnnotation.fromXMethod(xMethod); a.setDescription(MethodAnnotation.METHOD_RETURN_VALUE_OF); return a; } return null; }
invokedMethod = MethodAnnotation.fromXMethod(mp.getMethod()); if (mp.getParameterNumber() == 0 && TypeQualifierNullnessAnnotationDatabase.assertsFirstParameterIsNonnull(invokedXMethod)) {
cause = MethodAnnotation.fromXMethod(invokedMethod); cause.setDescription(MethodAnnotation.METHOD_CALLED);
XMethod m = item.getReturnValueOf(); if (m != null) { MethodAnnotation methodAnnotation = MethodAnnotation.fromXMethod(m); methodAnnotation.setDescription(MethodAnnotation.METHOD_RETURN_VALUE_OF); as.add(methodAnnotation);
public MethodAnnotation getMethodAnnotation() { return MethodAnnotation.fromXMethod(method); }
/** * Add a MethodAnnotation from an XMethod. * * @param xmethod * the XMethod * @return this object */ @Nonnull public BugInstance addMethod(XMethod xmethod) { addMethod(MethodAnnotation.fromXMethod(xmethod)); return this; }
public static @CheckForNull BugAnnotation getFieldOrMethodValueSource(@CheckForNull OpcodeStack.Item item) { if (item == null) { return null; } XField xField = item.getXField(); if (xField != null) { FieldAnnotation a = FieldAnnotation.fromXField(xField); a.setDescription(FieldAnnotation.LOADED_FROM_ROLE); return a; } XMethod xMethod = item.getReturnValueOf(); if (xMethod != null) { MethodAnnotation a = MethodAnnotation.fromXMethod(xMethod); a.setDescription(MethodAnnotation.METHOD_RETURN_VALUE_OF); return a; } return null; }
invokedMethod = MethodAnnotation.fromXMethod(mp.getMethod()); if (mp.getParameterNumber() == 0 && TypeQualifierNullnessAnnotationDatabase.assertsFirstParameterIsNonnull(invokedXMethod)) {
InvokeInstruction iins = (InvokeInstruction) ins; XMethod invokedMethod = XFactory.createXMethod((InvokeInstruction) ins, cpg); cause = MethodAnnotation.fromXMethod(invokedMethod); cause.setDescription(MethodAnnotation.METHOD_CALLED);
XMethod m = item.getReturnValueOf(); if (m != null) { MethodAnnotation methodAnnotation = MethodAnnotation.fromXMethod(m); methodAnnotation.setDescription(MethodAnnotation.METHOD_RETURN_VALUE_OF); as.add(methodAnnotation);