Package org.jvnet.hk2.config
Class MessageInterpolatorImpl
- java.lang.Object
-
- org.jvnet.hk2.config.MessageInterpolatorImpl
-
- All Implemented Interfaces:
jakarta.validation.MessageInterpolator
public class MessageInterpolatorImpl extends Object implements jakarta.validation.MessageInterpolator
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_VALIDATION_MESSAGESThe name of the default message bundle.static StringUSER_VALIDATION_MESSAGESThe name of the user-provided message bundle as defined in the specification.
-
Constructor Summary
Constructors Constructor Description MessageInterpolatorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringinterpolate(String message, jakarta.validation.MessageInterpolator.Context context)Stringinterpolate(String message, jakarta.validation.MessageInterpolator.Context context, Locale locale)Runs the message interpolation according to algorithm specified in JSR 303.
-
-
-
Field Detail
-
DEFAULT_VALIDATION_MESSAGES
public static final String DEFAULT_VALIDATION_MESSAGES
The name of the default message bundle.- See Also:
- Constant Field Values
-
USER_VALIDATION_MESSAGES
public static final String USER_VALIDATION_MESSAGES
The name of the user-provided message bundle as defined in the specification.- See Also:
- Constant Field Values
-
-
Method Detail
-
interpolate
public String interpolate(String message, jakarta.validation.MessageInterpolator.Context context)
- Specified by:
interpolatein interfacejakarta.validation.MessageInterpolator
-
interpolate
public String interpolate(String message, jakarta.validation.MessageInterpolator.Context context, Locale locale)
Runs the message interpolation according to algorithm specified in JSR 303.
Note:
Look-ups in user bundles is recursive whereas look-ups in default bundle are not!- Specified by:
interpolatein interfacejakarta.validation.MessageInterpolator- Parameters:
message- the message to interpolatecontext- the context of the annotation for which to interpolate this messagelocale- theLocaleto use for the resource bundle.- Returns:
- the interpolated message.
-
-