Class GenericListBlockParser
- java.lang.Object
-
- org.apache.maven.doxia.module.twiki.parser.GenericListBlockParser
-
- All Implemented Interfaces:
BlockParser
public class GenericListBlockParser extends java.lang.Object implements BlockParser
Generic list parser- Version:
- $Id$
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interfaceGenericListBlockParser.Type
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.StringEOLprivate FormatedTextParserformatedTextParserparser used to create text blocksprivate static GenericListBlockParser.TypeLISTunordered listprivate static GenericListBlockParser.TypeORDERED_LOWER_ALPHAa.private static GenericListBlockParser.TypeORDERED_UPPER_ALPHAA.private static GenericListBlockParser.TypeORDERERED_DECIMAL1.private static GenericListBlockParser.TypeORDERERED_LOWER_ROMANi.private static GenericListBlockParser.TypeORDERERED_UPPER_ROMANI.private java.util.regex.Pattern[]patternssupported patternsprivate static GenericListBlockParser.Type[]TYPES
-
Constructor Summary
Constructors Constructor Description GenericListBlockParser()Creates the GenericListBlockParser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(java.lang.String line)accept.voidsetTextParser(FormatedTextParser textParser)Sets the formatTextParser.Blockvisit(java.lang.String line, ByLineSource source)visit.
-
-
-
Field Detail
-
EOL
static final java.lang.String EOL
-
formatedTextParser
private FormatedTextParser formatedTextParser
parser used to create text blocks
-
patterns
private final java.util.regex.Pattern[] patterns
supported patterns
-
LIST
private static final GenericListBlockParser.Type LIST
unordered list
-
ORDERED_LOWER_ALPHA
private static final GenericListBlockParser.Type ORDERED_LOWER_ALPHA
a.
-
ORDERED_UPPER_ALPHA
private static final GenericListBlockParser.Type ORDERED_UPPER_ALPHA
A.
-
ORDERERED_DECIMAL
private static final GenericListBlockParser.Type ORDERERED_DECIMAL
1.
-
ORDERERED_LOWER_ROMAN
private static final GenericListBlockParser.Type ORDERERED_LOWER_ROMAN
i.
-
ORDERERED_UPPER_ROMAN
private static final GenericListBlockParser.Type ORDERERED_UPPER_ROMAN
I.
-
TYPES
private static final GenericListBlockParser.Type[] TYPES
-
-
Method Detail
-
accept
public final boolean accept(java.lang.String line)
accept.
- Specified by:
acceptin interfaceBlockParser- Parameters:
line- text line- Returns:
trueif this class can handle this line
-
visit
public final Block visit(java.lang.String line, ByLineSource source) throws ParseException
visit.
- Specified by:
visitin interfaceBlockParser- Parameters:
line- a line of textsource- the source of lines- Returns:
- a block
- Throws:
ParseException- on error
-
setTextParser
public final void setTextParser(FormatedTextParser textParser)
Sets the formatTextParser.- Parameters:
textParser-FormatedTextParserwith the formatTextParser.
-
-