Package com.vladsch.flexmark.parser.core
Class ListBlockParser
- java.lang.Object
-
- com.vladsch.flexmark.parser.block.AbstractBlockParser
-
- com.vladsch.flexmark.parser.core.ListBlockParser
-
- All Implemented Interfaces:
BlockParser
public class ListBlockParser extends AbstractBlockParser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ListBlockParser.Factory
-
Constructor Summary
Constructors Constructor Description ListBlockParser(ListOptions options, com.vladsch.flexmark.parser.core.ListBlockParser.ListData listData, ListItemParser listItemParser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
breakOutOnDoubleBlankLine()
boolean
canContain(ParserState state, BlockParser blockParser, Block block)
void
closeBlock(ParserState state)
ListBlock
getBlock()
ListItemParser
getLastChild()
com.vladsch.flexmark.parser.core.ListBlockParser.ListData
getListData()
ListOptions
getOptions()
boolean
isContainer()
void
setLastChild(ListItemParser lastChild)
BlockContinue
tryContinue(ParserState state)
See if the block parser can continue parsing the current block-
Methods inherited from class com.vladsch.flexmark.parser.block.AbstractBlockParser
addLine, canInterruptBy, finalizeClosedBlock, getBlockContent, getDataHolder, isClosed, isInterruptible, isParagraphParser, isPropagatingLastBlankLine, isRawText, parseInlines, removeBlankLines
-
-
-
-
Constructor Detail
-
ListBlockParser
public ListBlockParser(ListOptions options, com.vladsch.flexmark.parser.core.ListBlockParser.ListData listData, ListItemParser listItemParser)
-
-
Method Detail
-
getLastChild
public ListItemParser getLastChild()
-
setLastChild
public void setLastChild(ListItemParser lastChild)
-
getOptions
public ListOptions getOptions()
-
getListData
public com.vladsch.flexmark.parser.core.ListBlockParser.ListData getListData()
-
isContainer
public boolean isContainer()
- Specified by:
isContainer
in interfaceBlockParser
- Overrides:
isContainer
in classAbstractBlockParser
- Returns:
- true if the block that is parsed is a container (contains other blocks), or false if it's a leaf.
-
canContain
public boolean canContain(ParserState state, BlockParser blockParser, Block block)
- Specified by:
canContain
in interfaceBlockParser
- Overrides:
canContain
in classAbstractBlockParser
- Parameters:
state
- parser stateblockParser
- block parserblock
- new block being started @return true if this block parser's block can contain the given block type, false if it cannot
-
getBlock
public ListBlock getBlock()
- Returns:
- the block parser's block node instance
-
closeBlock
public void closeBlock(ParserState state)
-
breakOutOnDoubleBlankLine
public boolean breakOutOnDoubleBlankLine()
- Specified by:
breakOutOnDoubleBlankLine
in interfaceBlockParser
- Overrides:
breakOutOnDoubleBlankLine
in classAbstractBlockParser
- Returns:
- true if Double blank line should finalize this block parser and its children and reset to parent
-
tryContinue
public BlockContinue tryContinue(ParserState state)
Description copied from interface:BlockParser
See if the block parser can continue parsing the current block- Parameters:
state
- current parsing state- Returns:
- block continue instance
-
-