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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCalled to advance the next interpolation term of the message descriptor.voidreplaceCurrentInterpolationTerm(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 returnsfalseall interpolation terms have been processed andgetInterpolatedMessage()can be called.- Returns:
- Returns
truein case there are more message parameters,falseotherwise. - 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
-