Class TokenIterator
java.lang.Object
org.hibernate.validator.internal.engine.messageinterpolation.parser.TokenIterator
Allows to iterate over a list of message tokens and replace parameters.
- Author:
- Hardy Ferentschik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Called to advance the next interpolation term of the message descriptor.void
replaceCurrentInterpolationTerm
(String replacement) Replaces the current interpolation term with the given string.
-
Constructor Details
-
TokenIterator
-
-
Method Details
-
hasMoreInterpolationTerms
Called to advance the next interpolation term of the message descriptor. This message can be called multiple times. Once it returnsfalse
all interpolation terms have been processed andgetInterpolatedMessage()
can be called.- Returns:
- Returns
true
in case there are more message parameters,false
otherwise. - Throws:
MessageDescriptorFormatException
- in case the message descriptor is invalid
-
nextInterpolationTerm
- Returns:
- Returns the next interpolation term
-
replaceCurrentInterpolationTerm
Replaces the current interpolation term with the given string.- Parameters:
replacement
- The string to replace the current term with.
-
getInterpolatedMessage
-