com.arch.util.ContextualMessageInterpolator Maven / Gradle / Ivy
package com.arch.util;
import java.util.Locale;
import javax.validation.MessageInterpolator;
/**
* Created by wagner.araujo on 4/29/17.
*/
public class ContextualMessageInterpolator implements MessageInterpolator {
private final MessageInterpolator delegate;
public ContextualMessageInterpolator(MessageInterpolator delegate) {
this.delegate = delegate;
}
public String interpolate(String message, Context context) {
Locale locale = Locale.getDefault();
return this.delegate.interpolate(
message, context, locale );
}
public String interpolate(String message, Context context, Locale locale) {
return this.delegate.interpolate(message, context, locale);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy