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
public static class Parser.Builder extends BuilderBase<Parser.Builder>
Builder for configuring aParser
.
-
-
Field Summary
-
Fields inherited from interface com.vladsch.flexmark.util.data.DataHolder
NULL
-
-
Constructor Summary
Constructors Constructor Description Builder()
Builder(DataHolder options)
-
Method Summary
-
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
-
-
-
-
Constructor Detail
-
Builder
public Builder(DataHolder options)
-
Builder
public Builder()
-
-
Method Detail
-
build
@NotNull public Parser build()
- Specified by:
build
in classBuilderBase<Parser.Builder>
- Returns:
- the configured
Parser
-
removeApiPoint
protected void removeApiPoint(@NotNull java.lang.Object apiPoint)
Description copied from class:BuilderBase
Remove apiPoint from state information- Specified by:
removeApiPoint
in classBuilderBase<Parser.Builder>
- Parameters:
apiPoint
- api point object
-
preloadExtension
protected void preloadExtension(@NotNull Extension extension)
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
protected boolean loadExtension(@NotNull Extension extension)
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
public Parser.Builder customBlockParserFactory(CustomBlockParserFactory blockParserFactory)
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
public Parser.Builder customInlineParserFactory(InlineParserFactory blockParserFactory)
-
customDelimiterProcessor
public Parser.Builder customDelimiterProcessor(DelimiterProcessor delimiterProcessor)
-
postProcessorFactory
public Parser.Builder postProcessorFactory(PostProcessorFactory postProcessorFactory)
-
paragraphPreProcessorFactory
public Parser.Builder paragraphPreProcessorFactory(ParagraphPreProcessorFactory paragraphPreProcessorFactory)
-
blockPreProcessorFactory
public Parser.Builder blockPreProcessorFactory(BlockPreProcessorFactory blockPreProcessorFactory)
-
linkRefProcessorFactory
public Parser.Builder linkRefProcessorFactory(LinkRefProcessorFactory linkRefProcessor)
-
specialLeadInHandler
public Parser.Builder specialLeadInHandler(SpecialLeadInHandler specialLeadInHandler)
-
-