public abstract static class NexusBlockParser.Abstract extends Object implements NexusBlockParser
NexusBlockParser.Abstract
UNKNOWN_BLOCK
Constructor and Description |
---|
NexusBlockParser.Abstract(NexusBlockListener blockListener) |
Modifier and Type | Method and Description |
---|---|
void |
beginComment()
Opening a comment tag.
|
void |
commentText(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 String |
getBlockName() |
abstract void |
parseToken(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(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?
|
public NexusBlockParser.Abstract(NexusBlockListener blockListener)
public NexusBlockListener getBlockListener()
NexusBlockParser
getBlockListener
in interface NexusBlockParser
public void startBlock(String blockName)
NexusBlockParser
startBlock
in interface NexusBlockParser
blockName
- the name of the block.protected abstract void resetStatus()
protected 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(String comment) throws ParseException
NexusBlockParser
commentText
in interface NexusBlockParser
comment
- the text of the comment.ParseException
public abstract void parseToken(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
Copyright © 2014 BioJava. All rights reserved.