return null; Collection<MethodInfo> methods = c.methods.get(method.getName()); if (methods == null) { return null;
@NonNull ResolvedMethod method) { String name = method.getName(); if (ON_DETACHED_FROM_WINDOW.equals(name)) {
private static void checkThreading( @NonNull JavaContext context, @NonNull MethodInvocation node, @NonNull ResolvedMethod method, @NonNull String annotation) { String threadContext = getThreadContext(context, node); if (threadContext != null && !isCompatibleThread(threadContext, annotation)) { String message = String.format("Method %1$s must be called from the `%2$s` thread, currently inferred thread is `%3$s` thread", method.getName(), describeThread(annotation), describeThread(threadContext)); context.report(THREAD, node, context.getLocation(node), message); } }
String name = method.getContainingClass().getSimpleName() + "." + method.getName(); String message = getMissingPermissionMessage(requirement, name, permissions); context.report(MISSING_PERMISSION, node, context.getLocation(node), message);
String methodName = getName(); int argCount = getArgumentCount(); for (ResolvedMethod method : cls.getMethods(methodName, true)) {
private static void checkCallSuper(@NonNull JavaContext context, @NonNull MethodDeclaration declaration, @NonNull ResolvedMethod method) { ResolvedMethod superMethod = getRequiredSuperMethod(method); if (superMethod != null) { if (!SuperCallVisitor.callsSuper(context, declaration, superMethod)) { String methodName = method.getName(); String message = "Overriding method should call `super." + methodName + "`"; Location location = context.getLocation(declaration.astMethodName()); context.report(ISSUE, declaration, location, message); } } }