public abstract class DelegatingMultiStageHandler extends Object implements MultiStageHandler
MultiStageHandler that delegates to a Handler for each stage.| Constructor and Description |
|---|
DelegatingMultiStageHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
done()
Indicates that there are no more events to process.
|
void |
endAttribute(Location location,
TokenProperty<?> property)
An attribute has been cleared.
|
void |
endParagraph(Location location)
A paragraph has ended.
|
void |
endSentence(Location location)
The end of a sentence has been found.
|
boolean |
hasMoreStages()
Get if there any more stages needed.
|
protected abstract Handler |
next() |
void |
start()
Processing is starting.
|
void |
startAttribute(Location location,
TokenProperty<?> property,
Object value)
An attribute has been set by the source.
|
void |
startParagraph(Location location)
A new paragraph has been started.
|
void |
startSentence(Location location)
The start of a sentence has been found.
|
void |
token(Token token)
Token has been found, can either be whitespace, symbol or word.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwithStages, withStagesprotected abstract Handler next()
public void start()
Handlerpublic void startParagraph(Location location)
HandlerstartParagraph in interface Handlerlocation - the location of the paragraph. Locations are shared, the user should
copy the location if it needs to be used outside the current method.public void endParagraph(Location location)
HandlerendParagraph in interface Handlerlocation - the location of the paragraph end. Locations are shared, the user
should copy the location if it needs to be used outside the current
method.public void startSentence(Location location)
HandlerstartSentence in interface Handlerlocation - the location of the sentence. Locations are shared, the user should
copy the location if it needs to be used outside the current method.public void endSentence(Location location)
HandlerendSentence in interface Handlerlocation - the location of the sentence end. Locations are shared, the user
should copy the location if it needs to be used outside the current
method.public void startAttribute(Location location, TokenProperty<?> property, Object value)
HandlerstartAttribute in interface Handlerlocation - the location where the property is started. Locations are shared, the
user should copy the location if it needs to be used outside the
current method.property - the property to setvalue - the value of the propertypublic void endAttribute(Location location, TokenProperty<?> property)
HandlerendAttribute in interface Handlerlocation - the location where the property is ended. Locations are shared, the
user should copy the location if it needs to be used outside the
current method.public void token(Token token)
Handlertoken in interface Handlertoken - the token that has been found. Tokens are shared and should be copied
via Token.copy() if they need to be used outside of the current
method.public void done()
Handlerpublic boolean hasMoreStages()
MultiStageHandlerhasMoreStages in interface MultiStageHandlerCopyright © 2018. All rights reserved.