org.apache.maven.doxia.module.apt
Class AptParser

java.lang.Object
  extended by org.apache.maven.doxia.parser.AbstractParser
      extended by org.apache.maven.doxia.parser.AbstractTextParser
          extended by org.apache.maven.doxia.module.apt.AptParser
All Implemented Interfaces:
Markup, TextMarkup, AptMarkup, Parser

public class AptParser
extends AbstractTextParser
implements AptMarkup

The APT parser.
Based on the APTconvert project.

Since:
1.0
Version:
$Id: AptParser.java 572813 2007-09-04 20:46:47Z ltheussl $

Field Summary
static int TAB_WIDTH
          Default tab width.
 
Fields inherited from class org.apache.maven.doxia.parser.AbstractParser
macroManager, secondParsing
 
Fields inherited from interface org.apache.maven.doxia.module.apt.AptMarkup
ANCHOR_END_MARKUP, ANCHOR_START_MARKUP, BACKSLASH, BOLD_END_MARKUP, BOLD_START_MARKUP, BOXED_VERBATIM_END_MARKUP, BOXED_VERBATIM_START_MARKUP, COLON, 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_BOXED_VERBATIM_END_MARKUP, NON_BOXED_VERBATIM_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_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
 
Fields inherited from interface org.apache.maven.doxia.markup.TextMarkup
PIPE
 
Fields inherited from interface org.apache.maven.doxia.markup.Markup
EOL, EQUAL, GREATER_THAN, LEFT_CURLY_BRACKET, LEFT_SQUARE_BRACKET, LESS_THAN, MINUS, PLUS, QUOTE, RIGHT_CURLY_BRACKET, RIGHT_SQUARE_BRACKET, SLASH, SPACE, STAR
 
Fields inherited from interface org.apache.maven.doxia.parser.Parser
JUSTIFY_CENTER, JUSTIFY_LEFT, JUSTIFY_RIGHT, ROLE, TXT_TYPE, UNKNOWN_TYPE, XML_TYPE
 
Constructor Summary
AptParser()
           
 
Method Summary
 int getSourceLineNumber()
          Returns the current line number of the Apt source document.
 String getSourceName()
          Returns the name of the Apt source document.
 void parse(Reader source, Sink sink)
          Parses the given source model and emits Doxia events into the given sink.
 
Methods inherited from class org.apache.maven.doxia.parser.AbstractTextParser
getType
 
Methods inherited from class org.apache.maven.doxia.parser.AbstractParser
executeMacro, getBasedir, setSecondParsing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAB_WIDTH

public static final int TAB_WIDTH
Default tab width.

See Also:
Constant Field Values
Constructor Detail

AptParser

public AptParser()
Method Detail

parse

public void parse(Reader source,
                  Sink sink)
           throws AptParseException
Parses the given source model and emits Doxia events into the given sink.

Specified by:
parse in interface Parser
Parameters:
source - A reader that provides the source document.
sink - A sink that consumes the Doxia events.
Throws:
AptParseException

getSourceName

public String getSourceName()
Returns the name of the Apt source document.

Returns:
the source name.

getSourceLineNumber

public int getSourceLineNumber()
Returns the current line number of the Apt source document.

Returns:
the line number.


Copyright © 2005-2010 Apache Software Foundation. All Rights Reserved.