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 DataHolder
NULL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionblockPreProcessorFactory(BlockPreProcessorFactory blockPreProcessorFactory) @NotNull Parserbuild()customBlockParserFactory(CustomBlockParserFactory blockParserFactory) Adds a custom block parser factory.customDelimiterProcessor(DelimiterProcessor delimiterProcessor) customInlineParserExtensionFactory(InlineParserExtensionFactory inlineParserExtensionFactory) customInlineParserFactory(InlineParserFactory blockParserFactory) linkRefProcessorFactory(LinkRefProcessorFactory linkRefProcessor) protected booleanloadExtension(@NotNull Extension extension) Load extension if it is validparagraphPreProcessorFactory(ParagraphPreProcessorFactory paragraphPreProcessorFactory) postProcessorFactory(PostProcessorFactory postProcessorFactory) protected voidpreloadExtension(@NotNull Extension extension) Preload operation for extension, perform any data config and other operation needed for loading extensionprotected voidremoveApiPoint(@NotNull Object apiPoint) Remove apiPoint from state informationspecialLeadInHandler(SpecialLeadInHandler specialLeadInHandler) Methods inherited from class BuilderBase
addExtensionApiPoint, extensions, get, loadExtensions, removeExtensions, set, setMethods inherited from class MutableDataSet
clear, getOrCompute, merge, remove, setAll, setFrom, setIn, toDataSet, toImmutable, toMutableMethods inherited from class DataSet
aggregate, aggregate, aggregateActions, contains, equals, getAll, getKeys, hashCode, registerDataKeyAggregator, toStringMethods inherited from interface 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:
buildin classBuilderBase<Parser.Builder>- Returns:
- the configured
Parser
-
removeApiPoint
Description copied from class:BuilderBaseRemove apiPoint from state information- Specified by:
removeApiPointin classBuilderBase<Parser.Builder>- Parameters:
apiPoint- api point object
-
preloadExtension
Description copied from class:BuilderBasePreload operation for extension, perform any data config and other operation needed for loading extension- Specified by:
preloadExtensionin classBuilderBase<Parser.Builder>- Parameters:
extension- to preload
-
loadExtension
Description copied from class:BuilderBaseLoad extension if it is valid- Specified by:
loadExtensionin 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
-