public Void visitExecutable()

in tools/javac/ApiCollector.java [180:201]


        public Void visitExecutable(ExecutableElement e, Api api) {
            if (api == null || isNonApi(e)) return null;
            Api.Type parent = (Api.Type) api;
            Api.Method method = new Api.Method(parent, e.getSimpleName().toString(),
                    e.getParameters().stream()
                            .map(VariableElement::asType)
                            .map(TypeMirror::toString)
                            .toArray(String[]::new));
            method.modifiers.addAll(getModifiers(e));
            method.returnType = e.getReturnType().toString();
            method.thrownTypes = collectTypesToSet(e.getThrownTypes());
            method.typeParameters = getTypeParameters(e);
            method.deprecation = getDeprecationStatus(e);
            method.extension = round.getExtensionName(e);
            if (method.extension != null && (!parent.usage.inheritableByBackend ||
                    method.modifiers.contains(STATIC) || method.modifiers.contains(FINAL))) {
                processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR,
                        "Only methods intended to be inherited by the backend can be marked with @Extension", e);
            }
            parent.methods.put(method, method);
            return null;
        }