private String getAnnotation(Concept concept, Name name) { Annotation annotation = concept.getAnnotation(name); if (annotation != null) { return annotation.parameters() .flatMap(AnnotationParameter::values) .collect(joining(", ")); } return ""; } }
private void analyzeDocletTag(DocletTag docTag, Concept concept) { // Calculate the name: Name name = NameParser.parseUsingCase(docTag.getName()); // Create the annotation if it doesn't exist in the concept yet: Annotation annotation = concept.getAnnotation(name); if (annotation == null) { annotation = new Annotation(); annotation.setName(name); concept.addAnnotation(annotation); } // Create the "value" parameter if it doesn't exist yet: String value = docTag.getValue(); if (value != null) { value = value.trim(); if (!value.isEmpty()) { AnnotationParameter parameter = annotation.getParameter(VALUE); if (parameter == null) { parameter = new AnnotationParameter(); parameter.setName(VALUE); annotation.addParameter(parameter); } parameter.addValue(docTag.getValue()); } } }