Top Constructors Methods
jdk.internal.org.commonmark.parser.block

public abstract Class AbstractBlockParser

extends Object
implements BlockParser
Class Inheritance
All Implemented Interfaces
jdk.internal.org.commonmark.parser.block.BlockParser
Known Direct Subclasses
jdk.internal.org.commonmark.ext.gfm.tables.internal.TableBlockParser, jdk.internal.org.commonmark.internal.BlockQuoteParser, jdk.internal.org.commonmark.internal.DocumentBlockParser, jdk.internal.org.commonmark.internal.FencedCodeBlockParser, jdk.internal.org.commonmark.internal.HeadingParser, jdk.internal.org.commonmark.internal.HtmlBlockParser, jdk.internal.org.commonmark.internal.IndentedCodeBlockParser, jdk.internal.org.commonmark.internal.ListBlockParser, jdk.internal.org.commonmark.internal.ListItemParser, jdk.internal.org.commonmark.internal.ParagraphParser, jdk.internal.org.commonmark.internal.ThematicBreakParser
Imports
jdk.internal.org.commonmark.node.Block, .SourceSpan, jdk.internal.org.commonmark.parser.InlineParser, .SourceLine

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addLine(SourceLine line)

Implements jdk.internal.org.commonmark.parser.block.BlockParser.addLine.

Add the part of a line that belongs to this block parser to parse (i.e. without any container block markers).

public void
addSourceSpan(SourceSpan sourceSpan)

Implements jdk.internal.org.commonmark.parser.block.BlockParser.addSourceSpan.

Add a source span of the currently parsed block.

public boolean
public boolean
canHaveLazyContinuationLines()

Implements jdk.internal.org.commonmark.parser.block.BlockParser.canHaveLazyContinuationLines.

Return true if the block can have lazy continuation lines.

public void
public boolean
isContainer()

Implements jdk.internal.org.commonmark.parser.block.BlockParser.isContainer.

Return true if the block that is parsed is a container (contains other blocks), or false if it's a leaf.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractBlockParserback to summary
public AbstractBlockParser()

Method Detail

addLineback to summary
public void addLine(SourceLine line)

Implements jdk.internal.org.commonmark.parser.block.BlockParser.addLine.

Doc from jdk.internal.org.commonmark.parser.block.BlockParser.addLine.

Add the part of a line that belongs to this block parser to parse (i.e. without any container block markers). Note that the line will only include a SourceLine#getSourceSpan() if source spans are enabled for inlines.

Annotations
@Override
addSourceSpanback to summary
public void addSourceSpan(SourceSpan sourceSpan)

Implements jdk.internal.org.commonmark.parser.block.BlockParser.addSourceSpan.

Doc from jdk.internal.org.commonmark.parser.block.BlockParser.addSourceSpan.

Add a source span of the currently parsed block. The default implementation in AbstractBlockParser adds it to the block. Unless you have some complicated parsing where you need to check source positions, you don't need to override this.

Annotations
@Override
canContainback to summary
public boolean canContain(Block childBlock)

Implements jdk.internal.org.commonmark.parser.block.BlockParser.canContain.

Annotations
@Override
canHaveLazyContinuationLinesback to summary
public boolean canHaveLazyContinuationLines()

Implements jdk.internal.org.commonmark.parser.block.BlockParser.canHaveLazyContinuationLines.

Doc from jdk.internal.org.commonmark.parser.block.BlockParser.canHaveLazyContinuationLines.

Return true if the block can have lazy continuation lines.

Lazy continuation lines are lines that were rejected by this tryContinue(ParserState) but didn't match any other block parsers either.

If true is returned here, those lines will get added via addLine(SourceLine). For false, the block is closed instead.

Annotations
@Override
closeBlockback to summary
public void closeBlock()

Implements jdk.internal.org.commonmark.parser.block.BlockParser.closeBlock.

Annotations
@Override
isContainerback to summary
public boolean isContainer()

Implements jdk.internal.org.commonmark.parser.block.BlockParser.isContainer.

Doc from jdk.internal.org.commonmark.parser.block.BlockParser.isContainer.

Return true if the block that is parsed is a container (contains other blocks), or false if it's a leaf.

Annotations
@Override
parseInlinesback to summary
public void parseInlines(InlineParser inlineParser)

Implements jdk.internal.org.commonmark.parser.block.BlockParser.parseInlines.

Annotations
@Override