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 interface
GenericListBlockParser.Type
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.String
EOL
private FormatedTextParser
formatedTextParser
parser used to create text blocksprivate static GenericListBlockParser.Type
LIST
unordered listprivate static GenericListBlockParser.Type
ORDERED_LOWER_ALPHA
a.private static GenericListBlockParser.Type
ORDERED_UPPER_ALPHA
A.private static GenericListBlockParser.Type
ORDERERED_DECIMAL
1.private static GenericListBlockParser.Type
ORDERERED_LOWER_ROMAN
i.private static GenericListBlockParser.Type
ORDERERED_UPPER_ROMAN
I.private java.util.regex.Pattern[]
patterns
supported 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 boolean
accept(java.lang.String line)
accept.void
setTextParser(FormatedTextParser textParser)
Sets the formatTextParser.Block
visit(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:
accept
in interfaceBlockParser
- Parameters:
line
- text line- Returns:
true
if this class can handle this line
-
visit
public final Block visit(java.lang.String line, ByLineSource source) throws ParseException
visit.
- Specified by:
visit
in 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
-FormatedTextParser
with the formatTextParser.
-
-