Package org.commonmark.internal
Class InlineParserContextImpl
java.lang.Object
org.commonmark.internal.InlineParserContextImpl
- All Implemented Interfaces:
InlineParserContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Definitions
private final List
<DelimiterProcessor> private final List
<InlineContentParserFactory> private final List
<LinkProcessor> -
Constructor Summary
ConstructorsConstructorDescriptionInlineParserContextImpl
(List<InlineContentParserFactory> inlineContentParserFactories, List<DelimiterProcessor> delimiterProcessors, List<LinkProcessor> linkProcessors, Set<Character> linkMarkers, Definitions definitions) -
Method Summary
Modifier and TypeMethodDescription<D> D
getDefinition
(Class<D> type, String label) Look up a definition of a type for a given label.getLinkReferenceDefinition
(String label) Look up aLinkReferenceDefinition
for a given label.
-
Field Details
-
inlineContentParserFactories
-
delimiterProcessors
-
linkProcessors
-
linkMarkers
-
definitions
-
-
Constructor Details
-
InlineParserContextImpl
public InlineParserContextImpl(List<InlineContentParserFactory> inlineContentParserFactories, List<DelimiterProcessor> delimiterProcessors, List<LinkProcessor> linkProcessors, Set<Character> linkMarkers, Definitions definitions)
-
-
Method Details
-
getCustomInlineContentParserFactories
- Specified by:
getCustomInlineContentParserFactories
in interfaceInlineParserContext
- Returns:
- custom inline content parsers that have been configured with
Parser.Builder.customInlineContentParserFactory(InlineContentParserFactory)
-
getCustomDelimiterProcessors
- Specified by:
getCustomDelimiterProcessors
in interfaceInlineParserContext
- Returns:
- custom delimiter processors that have been configured with
Parser.Builder.customDelimiterProcessor(DelimiterProcessor)
-
getCustomLinkProcessors
- Specified by:
getCustomLinkProcessors
in interfaceInlineParserContext
- Returns:
- custom link processors that have been configured with
Parser.Builder.linkProcessor(org.commonmark.parser.beta.LinkProcessor)
.
-
getCustomLinkMarkers
- Specified by:
getCustomLinkMarkers
in interfaceInlineParserContext
- Returns:
- custom link markers that have been configured with
Parser.Builder.linkMarker(java.lang.Character)
.
-
getLinkReferenceDefinition
Description copied from interface:InlineParserContext
Look up aLinkReferenceDefinition
for a given label.Note that the passed in label does not need to be normalized; implementations are responsible for doing the normalization before lookup.
- Specified by:
getLinkReferenceDefinition
in interfaceInlineParserContext
- Parameters:
label
- the link label to look up- Returns:
- the definition if one exists,
null
otherwise
-
getDefinition
Description copied from interface:InlineParserContext
Look up a definition of a type for a given label.Note that the passed in label does not need to be normalized; implementations are responsible for doing the normalization before lookup.
- Specified by:
getDefinition
in interfaceInlineParserContext
- Returns:
- the definition if one exists, null otherwise
-