|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojavax.bio.phylo.io.nexus.NexusBlockParser.Abstract
public abstract static class NexusBlockParser.Abstract
All block parsers should derive from this abstract parser.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.biojavax.bio.phylo.io.nexus.NexusBlockParser |
---|
NexusBlockParser.Abstract |
Field Summary |
---|
Fields inherited from interface org.biojavax.bio.phylo.io.nexus.NexusBlockParser |
---|
UNKNOWN_BLOCK |
Constructor Summary | |
---|---|
NexusBlockParser.Abstract(NexusBlockListener blockListener)
|
Method Summary | |
---|---|
void |
beginComment()
Opening a comment tag. |
void |
commentText(java.lang.String comment)
Receiving free text inside a comment tag. |
void |
endBlock()
Notifies the parser that a block is ending. |
void |
endComment()
Closing a comment tag. |
void |
endTokenGroup()
Closing a line (semi-colon encountered). |
NexusBlockListener |
getBlockListener()
Obtain the listener for this parser. |
protected java.lang.String |
getBlockName()
|
abstract void |
parseToken(java.lang.String token)
Notifies the parser of the next token. |
protected abstract void |
resetStatus()
This function is called when the parser is reset before starting a new block. |
void |
startBlock(java.lang.String blockName)
Notifies the parser that a new block is starting. |
boolean |
wantsBracketsAndBraces()
Does the listener want to know about brackets and braces as separate tokens? |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NexusBlockParser.Abstract(NexusBlockListener blockListener)
Method Detail |
---|
public NexusBlockListener getBlockListener()
NexusBlockParser
getBlockListener
in interface NexusBlockParser
public void startBlock(java.lang.String blockName)
NexusBlockParser
startBlock
in interface NexusBlockParser
blockName
- the name of the block.protected abstract void resetStatus()
protected java.lang.String getBlockName()
public void endBlock()
NexusBlockParser
endBlock
in interface NexusBlockParser
public void beginComment()
NexusBlockParser
beginComment
in interface NexusBlockParser
public void endComment()
NexusBlockParser
endComment
in interface NexusBlockParser
public void endTokenGroup()
NexusBlockParser
endTokenGroup
in interface NexusBlockParser
public void commentText(java.lang.String comment) throws ParseException
NexusBlockParser
commentText
in interface NexusBlockParser
comment
- the text of the comment.
ParseException
public abstract void parseToken(java.lang.String token) throws ParseException
NexusBlockParser
parseToken
in interface NexusBlockParser
token
- the token to parse.
ParseException
- if the token is unparseable.public boolean wantsBracketsAndBraces()
NexusBlockParser
wantsBracketsAndBraces
in interface NexusBlockParser
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |