@Singleton @Named(value="apt") public class AptParser extends org.apache.maven.doxia.parser.AbstractTextParser implements AptMarkup
Modifier and Type | Class and Description |
---|---|
class |
AptParser.Section3
A Section3 Block.
|
Modifier and Type | Field and Description |
---|---|
protected String |
line
a line of AptSource.
|
protected org.apache.maven.doxia.sink.Sink |
sink
the sink to receive the events.
|
protected String |
sourceContent
sourceContent.
|
protected static char[] |
SPACES
An array of 85 spaces.
|
static int |
TAB_WIDTH
Default tab width.
|
ANCHOR_END_MARKUP, ANCHOR_START_MARKUP, BACKSLASH, BOLD_END_MARKUP, BOLD_START_MARKUP, COMMENT, HEADER_START_MARKUP, HORIZONTAL_RULE_MARKUP, ITALIC_END_MARKUP, ITALIC_START_MARKUP, LINK_END_MARKUP, LINK_START_1_MARKUP, LINK_START_2_MARKUP, LIST_END_MARKUP, LIST_START_MARKUP, MONOSPACED_END_MARKUP, MONOSPACED_START_MARKUP, NON_BREAKING_SPACE_MARKUP, NUMBERING, NUMBERING_LOWER_ALPHA_CHAR, NUMBERING_LOWER_ROMAN_CHAR, NUMBERING_UPPER_ALPHA_CHAR, NUMBERING_UPPER_ROMAN_CHAR, PAGE_BREAK, PAGE_BREAK_MARKUP, PERCENT, SECTION_TITLE_START_MARKUP, TAB, TABLE_CELL_SEPARATOR_MARKUP, TABLE_COL_CENTERED_ALIGNED_MARKUP, TABLE_COL_LEFT_ALIGNED_MARKUP, TABLE_COL_RIGHT_ALIGNED_MARKUP, TABLE_ROW_SEPARATOR_MARKUP, TABLE_ROW_START_MARKUP, VERBATIM_END_MARKUP, VERBATIM_SOURCE_END_MARKUP, VERBATIM_SOURCE_START_MARKUP, VERBATIM_START_MARKUP
Constructor and Description |
---|
AptParser() |
Modifier and Type | Method and Description |
---|---|
protected static char |
charAt(String string,
int length,
int i)
Returns the character at position i of the given string.
|
protected void |
doTraverseText(String text,
int begin,
int end,
org.apache.maven.doxia.sink.Sink sink)
Parse the given text.
|
int |
getSourceLineNumber()
Returns the current line number of the Apt source document.
|
String |
getSourceName()
Returns the name of the Apt source document.
|
protected void |
init() |
protected void |
nextLine()
Parse the next line of the Apt source document.
|
void |
parse(Reader source,
org.apache.maven.doxia.sink.Sink sink) |
void |
parse(Reader source,
org.apache.maven.doxia.sink.Sink sink,
String reference) |
protected static String |
replaceAll(String string,
String oldSub,
String newSub)
Replace part of a string.
|
protected static int |
skipSpace(String string,
int length,
int i)
Skip spaces.
|
addSinkWrapperFactory, doxiaVersion, executeMacro, getBasedir, getMacroManager, getSinkWrapperFactories, getWrappedSink, isEmitAnchorsForIndexableEntries, isEmitComments, isSecondParsing, parse, parse, setEmitAnchorsForIndexableEntries, setEmitComments, setSecondParsing
protected static final char[] SPACES
public static final int TAB_WIDTH
protected String sourceContent
protected org.apache.maven.doxia.sink.Sink sink
public AptParser()
public void parse(Reader source, org.apache.maven.doxia.sink.Sink sink) throws org.apache.maven.doxia.parser.ParseException
parse
in interface org.apache.maven.doxia.parser.Parser
parse
in class org.apache.maven.doxia.parser.AbstractParser
org.apache.maven.doxia.parser.ParseException
public void parse(Reader source, org.apache.maven.doxia.sink.Sink sink, String reference) throws org.apache.maven.doxia.parser.ParseException
parse
in interface org.apache.maven.doxia.parser.Parser
org.apache.maven.doxia.parser.ParseException
public String getSourceName()
public int getSourceLineNumber()
protected void nextLine() throws AptParseException
AptParseException
- if something goes wrong.protected void doTraverseText(String text, int begin, int end, org.apache.maven.doxia.sink.Sink sink) throws AptParseException
text
- the text to parse.begin
- offset.end
- offset.sink
- the sink to receive the events.AptParseException
- if something goes wrong.protected static char charAt(String string, int length, int i)
string
- the string.length
- length.i
- offset.protected static int skipSpace(String string, int length, int i)
string
- string.length
- length.i
- offset.protected static String replaceAll(String string, String oldSub, String newSub)
string
- the stringoldSub
- the substring to replacenewSub
- the replacement stringprotected void init()
init
in class org.apache.maven.doxia.parser.AbstractParser
Copyright © 2005–2024 The Apache Software Foundation. All rights reserved.