org.jvnet.hk2.config
Class MessageInterpolatorImpl

java.lang.Object
  extended by org.jvnet.hk2.config.MessageInterpolatorImpl
All Implemented Interfaces:
javax.validation.MessageInterpolator

public class MessageInterpolatorImpl
extends Object
implements javax.validation.MessageInterpolator


Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.validation.MessageInterpolator
javax.validation.MessageInterpolator.Context
 
Field Summary
static String DEFAULT_VALIDATION_MESSAGES
          The name of the default message bundle.
static String USER_VALIDATION_MESSAGES
          The name of the user-provided message bundle as defined in the specification.
 
Constructor Summary
MessageInterpolatorImpl()
           
 
Method Summary
 String interpolate(String message, javax.validation.MessageInterpolator.Context context)
           
 String interpolate(String message, javax.validation.MessageInterpolator.Context context, Locale locale)
          Runs the message interpolation according to algorithm specified in JSR 303.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

MessageInterpolatorImpl

public MessageInterpolatorImpl()
Method Detail

interpolate

public String interpolate(String message,
                          javax.validation.MessageInterpolator.Context context)
Specified by:
interpolate in interface javax.validation.MessageInterpolator

interpolate

public String interpolate(String message,
                          javax.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:
interpolate in interface javax.validation.MessageInterpolator
Parameters:
message - the message to interpolate
annotationParameters - the parameters of the annotation for which to interpolate this message
locale - the Locale to use for the resource bundle.
Returns:
the interpolated message.


Copyright © 2013 Oracle Corporation. All Rights Reserved.