Interface PhraseHandler
-
public interface PhraseHandler
Handler interface used for traversing aPhrase
tree.Custom traversal/modification of phrases can be created by implementing this interface and passing it to
Phrase.rewrite(PhraseHandler)
orPhrase.rewriteChildren(PhraseHandler)
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Phrase
handlePhrase(Phrase phrase)
Method called for handling an encounteredPhrase
during traversal.
-
-
-
Method Detail
-
handlePhrase
Phrase handlePhrase(Phrase phrase)
Method called for handling an encounteredPhrase
during traversal.Return the passed in
phrase
if modified in place or no modification to tree should be made. Return a newPhrase
instance to replace the passed inphrase
in the query tree. Returnnull
to remove the phrase from the tree.NOTE: returning a new
Phrase
instance ornull
will result in stopping any recursive traversal.
-
-