Class DocumentationExtractor

java.lang.Object
org.infinispan.protostream.annotations.impl.types.DocumentationExtractor

public final class DocumentationExtractor extends Object
Since:
3.0
  • Field Details

  • Constructor Details

    • DocumentationExtractor

      public DocumentationExtractor()
  • Method Details

    • getDocumentation

      private static StringBuilder getDocumentation(ProtoComment[] annotations)
      Collect and concatenate the description text from the @ProtoDoc.value of the given ProtoDoc annotations (that were previously obtained either from an AnnotatedElement or an AnnotatedConstruct). Each annotation value is put on a separate line. The beginning and trailing empty lines are trimmed off. If the resulting documentation text does not have any line then null is returned.
    • getDocumentation

      public static String getDocumentation(Element element, boolean fullyQualified)
      Collect and concatenate the description text from an element (type, field, method). This unwraps @ProtoDoc.values and copies other annotations as-is. The beginning and trailing empty lines are trimmed off. If the resulting documentation text does not have any line then null is returned.
    • getDocumentation

      public static String getDocumentation(Field f, boolean fullyQualified)
    • getDocumentation

      public static String getDocumentation(Class<?> clazz, boolean fullyQualified)
    • getDocumentation

      public static String getDocumentation(Method method, boolean fullyQualified)
    • getDocumentation

      private static String getDocumentation(StringBuilder docs, Annotation[] annotations, boolean fullyQualified)
    • annotationToString

      private static StringBuilder annotationToString(StringBuilder docs, String s, boolean fullyQualified)