Package com.github.chhorz.javadoc
Class JavaDocParserBuilder
- java.lang.Object
-
- com.github.chhorz.javadoc.JavaDocParserBuilder
-
public class JavaDocParserBuilder extends java.lang.Object
Fluent builder to create aJavaDocParser
instance.- Author:
- chhorz
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<BlockTag>
STANDARD_JAVADOC_TAGS
static java.util.List<BlockTag>
STANDARD_KDOC_TAGS
static java.util.List<BlockTag>
UNOFFICIAL_TAGS
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JavaDocParser
build()
Create theJavaDocParser
instance.static JavaDocParserBuilder
withAllKnownTags()
Creates a new builder instance with all known block tags ofSTANDARD_JAVADOC_TAGS
andSTANDARD_KDOC_TAGS
.JavaDocParserBuilder
withOutputType(OutputType outputType)
Adds string replacements based on regular expressions to convert JavaDoc format into the given output format.static JavaDocParserBuilder
withoutTags()
Create a new builder instance without any javadoc tags.JavaDocParserBuilder
withReplacement(Replacement replacement)
Adds custom replacements for the output content.static JavaDocParserBuilder
withStandardJavadocTags()
Adds all tags from the official Oracle documentation.static JavaDocParserBuilder
withStandardKDocTags()
Adds all tags from the official Kotlin documentation.<T extends BlockTag>
JavaDocParserBuilderwithTag(T tag)
Adds a javadoc tag to the parser instance.
-
-
-
Method Detail
-
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 ofSTANDARD_JAVADOC_TAGS
andSTANDARD_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:
withOutputType(OutputType)
-
build
public JavaDocParser build()
Create theJavaDocParser
instance.- Returns:
- a new parser instance
-
-