public abstract static class NexusFileListener.Abstract extends Object implements NexusFileListener
NexusFileListener.Abstract| Constructor and Description |
|---|
NexusFileListener.Abstract() |
| Modifier and Type | Method and Description |
|---|---|
void |
beginComment()
Opening a comment tag.
|
protected abstract void |
beginFileComment()
This method will get called when a comment is started on the file,
and not any block within it.
|
protected abstract void |
blockEnded(NexusBlockParser blockParser)
This method gets called when the block parser is expected to have
finished parsing a block.
|
void |
commentText(String comment)
Receiving free text inside a comment tag.
|
void |
endBlock()
Finished reading a block.
|
void |
endComment()
Closing a comment tag.
|
protected abstract void |
endFileComment()
This method will get called when a comment is ended on the file, and
not any block within it.
|
void |
endTokenGroup()
Closing a line (semi-colon encountered).
|
protected abstract void |
fileCommentText(String comment)
This method will get called when comment text is found on the file,
and not any block within it.
|
NexusBlockParser |
getBlockParser(String blockName)
Gets the parser to use for a given block.
|
void |
parseToken(String token)
Encountered a token.
|
void |
setBlockParser(String blockName,
NexusBlockParser parser)
Sets the parser to use for a given block.
|
void |
setDefaultBlockParsers()
Causes the default block parsers to be assigned.
|
void |
startBlock(String blockName)
About to start a new block.
|
boolean |
wantsBracketsAndBraces()
Does the listener want to know about brackets and braces as separate
tokens?
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitendFile, startFilepublic void beginComment()
NexusFileListenerbeginComment in interface NexusFileListenerprotected abstract void beginFileComment()
public void commentText(String comment) throws ParseException
NexusFileListenercommentText in interface NexusFileListenercomment - the text of the comment.ParseExceptionprotected abstract void fileCommentText(String comment)
comment - the comment text.public void endComment()
NexusFileListenerendComment in interface NexusFileListenerprotected abstract void endFileComment()
public void endBlock()
NexusFileListenerendBlock in interface NexusFileListenerprotected abstract void blockEnded(NexusBlockParser blockParser)
blockParser - the parser that has finished.public boolean wantsBracketsAndBraces()
NexusFileListenerwantsBracketsAndBraces in interface NexusFileListenerpublic void setDefaultBlockParsers()
NexusFileListenersetDefaultBlockParsers in interface NexusFileListenerpublic NexusBlockParser getBlockParser(String blockName)
NexusFileListenergetBlockParser in interface NexusFileListenerblockName - the name of the block. return parser the parser to use. Is
never null.public void endTokenGroup()
NexusFileListenerendTokenGroup in interface NexusFileListenerpublic void parseToken(String token) throws ParseException
NexusFileListenerparseToken in interface NexusFileListenertoken - the token.ParseException - if the token is invalid.public void setBlockParser(String blockName, NexusBlockParser parser)
NexusFileListenersetBlockParser in interface NexusFileListenerblockName - the name of the block.parser - the parser to use. Use null to unset an existing
one and use the default one for that block instead.public void startBlock(String blockName)
NexusFileListenerstartBlock in interface NexusFileListenerblockName - the name of the new block.