Package org.commonmark.internal
Class InlineParserContextImpl
- java.lang.Object
-
- org.commonmark.internal.InlineParserContextImpl
-
- All Implemented Interfaces:
InlineParserContext
public class InlineParserContextImpl extends java.lang.Object implements InlineParserContext
-
-
Field Summary
Fields Modifier and Type Field Description private Definitions
definitions
private java.util.List<DelimiterProcessor>
delimiterProcessors
private java.util.List<InlineContentParserFactory>
inlineContentParserFactories
private java.util.Set<java.lang.Character>
linkMarkers
private java.util.List<LinkProcessor>
linkProcessors
-
Constructor Summary
Constructors Constructor Description InlineParserContextImpl(java.util.List<InlineContentParserFactory> inlineContentParserFactories, java.util.List<DelimiterProcessor> delimiterProcessors, java.util.List<LinkProcessor> linkProcessors, java.util.Set<java.lang.Character> linkMarkers, Definitions definitions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<DelimiterProcessor>
getCustomDelimiterProcessors()
java.util.List<InlineContentParserFactory>
getCustomInlineContentParserFactories()
java.util.Set<java.lang.Character>
getCustomLinkMarkers()
java.util.List<LinkProcessor>
getCustomLinkProcessors()
<D> D
getDefinition(java.lang.Class<D> type, java.lang.String label)
Look up a definition of a type for a given label.LinkReferenceDefinition
getLinkReferenceDefinition(java.lang.String label)
Look up aLinkReferenceDefinition
for a given label.
-
-
-
Field Detail
-
inlineContentParserFactories
private final java.util.List<InlineContentParserFactory> inlineContentParserFactories
-
delimiterProcessors
private final java.util.List<DelimiterProcessor> delimiterProcessors
-
linkProcessors
private final java.util.List<LinkProcessor> linkProcessors
-
linkMarkers
private final java.util.Set<java.lang.Character> linkMarkers
-
definitions
private final Definitions definitions
-
-
Constructor Detail
-
InlineParserContextImpl
public InlineParserContextImpl(java.util.List<InlineContentParserFactory> inlineContentParserFactories, java.util.List<DelimiterProcessor> delimiterProcessors, java.util.List<LinkProcessor> linkProcessors, java.util.Set<java.lang.Character> linkMarkers, Definitions definitions)
-
-
Method Detail
-
getCustomInlineContentParserFactories
public java.util.List<InlineContentParserFactory> getCustomInlineContentParserFactories()
- Specified by:
getCustomInlineContentParserFactories
in interfaceInlineParserContext
- Returns:
- custom inline content parsers that have been configured with
Parser.Builder.customInlineContentParserFactory(InlineContentParserFactory)
-
getCustomDelimiterProcessors
public java.util.List<DelimiterProcessor> getCustomDelimiterProcessors()
- Specified by:
getCustomDelimiterProcessors
in interfaceInlineParserContext
- Returns:
- custom delimiter processors that have been configured with
Parser.Builder.customDelimiterProcessor(DelimiterProcessor)
-
getCustomLinkProcessors
public java.util.List<LinkProcessor> getCustomLinkProcessors()
- Specified by:
getCustomLinkProcessors
in interfaceInlineParserContext
- Returns:
- custom link processors that have been configured with
Parser.Builder.linkProcessor(org.commonmark.parser.beta.LinkProcessor)
.
-
getCustomLinkMarkers
public java.util.Set<java.lang.Character> getCustomLinkMarkers()
- Specified by:
getCustomLinkMarkers
in interfaceInlineParserContext
- Returns:
- custom link markers that have been configured with
Parser.Builder.linkMarker(java.lang.Character)
.
-
getLinkReferenceDefinition
public LinkReferenceDefinition getLinkReferenceDefinition(java.lang.String label)
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
public <D> D getDefinition(java.lang.Class<D> type, java.lang.String label)
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
-
-