Package com.swabunga.spell.event
Class JavaWordFinder
java.lang.Object
com.swabunga.spell.event.AbstractWordFinder
com.swabunga.spell.event.JavaWordFinder
- All Implemented Interfaces:
WordFinder
A word finder Java source files, which searches text for sequences of
letters formated as Java comments.
- Author:
- Anthony Roy (ajr@antroy.co.uk)
-
Field Summary
Fields inherited from class com.swabunga.spell.event.AbstractWordFinder
currentWord, nextWord, sentenceIterator, startsSentence, text
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new JavaWordFinder object.JavaWordFinder
(String inText) Creates a new JavaWordFinder object. -
Method Summary
Methods inherited from class com.swabunga.spell.event.AbstractWordFinder
current, getText, hasNext, ignore, ignore, ignore, ignore, isWordChar, isWordChar, replace, setSentenceIterator, setText, startsSentence, toString
-
Constructor Details
-
JavaWordFinder
Creates a new JavaWordFinder object.- Parameters:
inText
- the String to search
-
JavaWordFinder
public JavaWordFinder()Creates a new JavaWordFinder object.
-
-
Method Details
-
next
This method scans the text from the end of the last word, and returns a new Word object corresponding to the next word.- Specified by:
next
in interfaceWordFinder
- Specified by:
next
in classAbstractWordFinder
- Returns:
- the next word.
- Throws:
WordNotFoundException
- search string contains no more words.
-
init
protected void init()Initializes this word finder- Overrides:
init
in classAbstractWordFinder
-