Class AptParser.Block
- java.lang.Object
-
- org.apache.maven.doxia.module.apt.AptParser.Block
-
- Direct Known Subclasses:
AptParser.Comment,AptParser.DefinitionListItem,AptParser.Figure,AptParser.HorizontalRule,AptParser.ListBreak,AptParser.ListItem,AptParser.MacroBlock,AptParser.NumberedListItem,AptParser.PageBreak,AptParser.Paragraph,AptParser.Section,AptParser.Table,AptParser.Title,AptParser.Verbatim
- Enclosing class:
- AptParser
private abstract class AptParser.Block extends java.lang.ObjectA block of an apt source document.
-
-
Field Summary
Fields Modifier and Type Field Description protected intindentindent.protected java.lang.Stringtexttext.protected inttextLengthtextLength.protected inttypetype.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intgetIndent()Return the block indent.intgetType()Return the block type.protected intskipFromLeftToRightBracket(int i)Skip brackets.protected intskipLeadingBullets()Skip spaces.protected intskipSpaceFrom(int i)Skip spaces.abstract voidtraverse()Parse the block.protected voidtraverseText(int begin)Traverse the text.protected voidtraverseText(int begin, int end)Traverse the text.
-
-
-
Constructor Detail
-
Block
Block(int type, int indent) throws AptParseExceptionConstructor.- Parameters:
type- the block type.indent- indent.- Throws:
AptParseException- AptParseException
-
Block
Block(int type, int indent, java.lang.String firstLine) throws AptParseExceptionConstructor.- Parameters:
type- type.indent- indent.firstLine- the first line.- Throws:
AptParseException- AptParseException
-
-
Method Detail
-
getType
public final int getType()
Return the block type.- Returns:
- int
-
getIndent
public final int getIndent()
Return the block indent.- Returns:
- int
-
traverse
public abstract void traverse() throws AptParseExceptionParse the block.- Throws:
AptParseException- if something goes wrong.
-
traverseText
protected void traverseText(int begin) throws AptParseExceptionTraverse the text.- Parameters:
begin- offset.- Throws:
AptParseException- if something goes wrong.
-
traverseText
protected void traverseText(int begin, int end) throws AptParseExceptionTraverse the text.- Parameters:
begin- offset.end- offset.- Throws:
AptParseException- if something goes wrong.
-
skipLeadingBullets
protected int skipLeadingBullets()
Skip spaces.- Returns:
- int.
-
skipFromLeftToRightBracket
protected int skipFromLeftToRightBracket(int i) throws AptParseExceptionSkip brackets.- Parameters:
i- offset.- Returns:
- int.
- Throws:
AptParseException- if something goes wrong.
-
skipSpaceFrom
protected final int skipSpaceFrom(int i)
Skip spaces.- Parameters:
i- offset.- Returns:
- int.
-
-