Package com.vladsch.flexmark.parser
Class Parser.Builder
java.lang.Object
com.vladsch.flexmark.util.data.DataSet
com.vladsch.flexmark.util.data.MutableDataSet
com.vladsch.flexmark.util.builder.BuilderBase<Parser.Builder>
com.vladsch.flexmark.parser.Parser.Builder
- All Implemented Interfaces:
DataHolder
,MutableDataHolder
,MutableDataSetter
- Enclosing class:
Parser
Builder for configuring a
Parser
.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final List
<CustomBlockParserFactory> (package private) final List
<BlockPreProcessorFactory> (package private) final List
<DelimiterProcessor> (package private) final List
<InlineParserExtensionFactory> (package private) InlineParserFactory
(package private) final List
<LinkRefProcessorFactory> (package private) final List
<ParagraphPreProcessorFactory> (package private) final List
<PostProcessorFactory> (package private) final List
<SpecialLeadInHandler> Fields inherited from interface com.vladsch.flexmark.util.data.DataHolder
NULL
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionblockPreProcessorFactory
(BlockPreProcessorFactory blockPreProcessorFactory) @NotNull Parser
build()
customBlockParserFactory
(CustomBlockParserFactory blockParserFactory) Adds a custom block parser factory.customDelimiterProcessor
(DelimiterProcessor delimiterProcessor) customInlineParserExtensionFactory
(InlineParserExtensionFactory inlineParserExtensionFactory) customInlineParserFactory
(InlineParserFactory blockParserFactory) linkRefProcessorFactory
(LinkRefProcessorFactory linkRefProcessor) protected boolean
loadExtension
(@NotNull Extension extension) Load extension if it is validparagraphPreProcessorFactory
(ParagraphPreProcessorFactory paragraphPreProcessorFactory) postProcessorFactory
(PostProcessorFactory postProcessorFactory) protected void
preloadExtension
(@NotNull Extension extension) Preload operation for extension, perform any data config and other operation needed for loading extensionprotected void
removeApiPoint
(@NotNull Object apiPoint) Remove apiPoint from state informationspecialLeadInHandler
(SpecialLeadInHandler specialLeadInHandler) Methods inherited from class com.vladsch.flexmark.util.builder.BuilderBase
addExtensionApiPoint, extensions, get, loadExtensions, removeExtensions, set, set
Methods inherited from class com.vladsch.flexmark.util.data.MutableDataSet
clear, getOrCompute, merge, remove, setAll, setFrom, setIn, toDataSet, toImmutable, toMutable
Methods inherited from class com.vladsch.flexmark.util.data.DataSet
aggregate, aggregate, aggregateActions, contains, equals, getAll, getKeys, hashCode, registerDataKeyAggregator, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.vladsch.flexmark.util.data.DataHolder
contains, getAll, getKeys
-
Field Details
-
blockParserFactories
-
delimiterProcessors
-
postProcessorFactories
-
paragraphPreProcessorFactories
-
blockPreProcessorFactories
-
linkRefProcessors
-
inlineParserExtensionFactories
-
inlineParserFactory
InlineParserFactory inlineParserFactory -
specialLeadInHandlers
-
-
Constructor Details
-
Builder
-
Builder
public Builder()
-
-
Method Details
-
build
- Specified by:
build
in classBuilderBase<Parser.Builder>
- Returns:
- the configured
Parser
-
removeApiPoint
Description copied from class:BuilderBase
Remove apiPoint from state information- Specified by:
removeApiPoint
in classBuilderBase<Parser.Builder>
- Parameters:
apiPoint
- api point object
-
preloadExtension
Description copied from class:BuilderBase
Preload operation for extension, perform any data config and other operation needed for loading extension- Specified by:
preloadExtension
in classBuilderBase<Parser.Builder>
- Parameters:
extension
- to preload
-
loadExtension
Description copied from class:BuilderBase
Load extension if it is valid- Specified by:
loadExtension
in classBuilderBase<Parser.Builder>
- Parameters:
extension
- to load- Returns:
- true if extension was loaded
-
customBlockParserFactory
Adds a custom block parser factory.Note that custom factories are applied before the built-in factories. This is so that extensions can change how some syntax is parsed that would otherwise be handled by built-in factories. "With great power comes great responsibility."
- Parameters:
blockParserFactory
- a block parser factory implementation- Returns:
this
-
customInlineParserExtensionFactory
public Parser.Builder customInlineParserExtensionFactory(InlineParserExtensionFactory inlineParserExtensionFactory) -
customInlineParserFactory
-
customDelimiterProcessor
-
postProcessorFactory
-
paragraphPreProcessorFactory
public Parser.Builder paragraphPreProcessorFactory(ParagraphPreProcessorFactory paragraphPreProcessorFactory) -
blockPreProcessorFactory
-
linkRefProcessorFactory
-
specialLeadInHandler
-