private void processMethod(ExecutableElement method) throws IOException {
        final QualifiedNameable enclosingElement = (QualifiedNameable) method.getEnclosingElement();
        assert enclosingElement != null;
        final String className = enclosingElement.getQualifiedName().toString();
        final Properties properties = readProperties(className);
        final String docComment = processingEnv.getElementUtils().getDocComment(method);
        if (docComment == null || !docComment.contains("@param")) {
            return;
        }
        final List<List<String>> lines = Streams.stream(LINEBREAK_SPLITTER.split(docComment))
                                                .map(line -> Arrays.stream(line.split("\\s"))
                                                                   .filter(word -> !word.trim().isEmpty())
                                                                   .collect(toImmutableList()))
                                                .collect(toImmutableList());
        method.getParameters().forEach(param -> {
            final StringBuilder stringBuilder = new StringBuilder();
            JavaDocParserState state = JavaDocParserState.SEARCHING;
            for (List<String> line : lines) {
                final List<String> subLine;
                if ((line.size() < 3 ||
                     !"@param".equals(line.get(0)) ||
                     !param.getSimpleName().toString().equals(line.get(1))) &&
                    state == JavaDocParserState.SEARCHING) {
                    continue;
                } else if (state == JavaDocParserState.IN_DESCRIPTION &&
                           !line.isEmpty() &&
                           line.get(0).startsWith("@")) {
                    break;
                } else if (state == JavaDocParserState.SEARCHING) {
                    subLine = line.subList(2, line.size());
                    state = JavaDocParserState.IN_DESCRIPTION;
                } else {
                    subLine = line;
                }
                for (String word : subLine) {
                    stringBuilder.append(word);
                    stringBuilder.append(' ');
                }
            }
            setProperty(properties, method, param, stringBuilder.toString().trim());
        });
    }
Processor that creates a properties file based on the JavaDoc/KDoc description of parameters for interfaces.
This file can be later used if the {@link Description} annotation does not exist for parameters or methods.
annotation-processor/src/main/java/com/linecorp/armeria/server/annotation/processor/DocumentationProcessor.java