Class JavaDocParserBuilder

java.lang.Object
com.github.chhorz.javadoc.JavaDocParserBuilder

public class JavaDocParserBuilder extends Object
Fluent builder to create a JavaDocParser instance.
Author:
chhorz
  • Field Details

    • STANDARD_JAVADOC_TAGS

      public static final List<BlockTag> STANDARD_JAVADOC_TAGS
    • STANDARD_KDOC_TAGS

      public static final List<BlockTag> STANDARD_KDOC_TAGS
    • UNOFFICIAL_TAGS

      public static final List<BlockTag> UNOFFICIAL_TAGS
  • Method Details

    • withoutTags

      public static JavaDocParserBuilder withoutTags()
      Create a new builder instance without any javadoc tags.
      Returns:
      a new builder instance
    • withStandardJavadocTags

      public static JavaDocParserBuilder withStandardJavadocTags()
      Adds all tags from the official Oracle documentation.
      Returns:
      a new builder instance
    • withStandardKDocTags

      public static JavaDocParserBuilder withStandardKDocTags()
      Adds all tags from the official Kotlin documentation.
      Returns:
      a new builder instance
    • withAllKnownTags

      public static JavaDocParserBuilder withAllKnownTags()
      Creates a new builder instance with all known block tags of STANDARD_JAVADOC_TAGS and STANDARD_KDOC_TAGS.
      Returns:
      a new builder instance
    • withTag

      public <T extends BlockTag> JavaDocParserBuilder withTag(T tag)
      Adds a javadoc tag to the parser instance.
      Type Parameters:
      T - type representation of the custom tag
      Parameters:
      tag - a new instance of the custom tag
      Returns:
      the updated builder instance
    • withOutputType

      public JavaDocParserBuilder withOutputType(OutputType outputType)
      Adds string replacements based on regular expressions to convert JavaDoc format into the given output format.
      Parameters:
      outputType - the requested output type
      Returns:
      the fluent builder instance
    • withReplacement

      public JavaDocParserBuilder withReplacement(Replacement replacement)
      Adds custom replacements for the output content.
      Parameters:
      replacement - the replacement function
      Returns:
      the fluent builder instance
      See Also:
    • build

      public JavaDocParser build()
      Create the JavaDocParser instance.
      Returns:
      a new parser instance