Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 import java.util.Map;
public class Translator extends ForwardingMap<Class<?>, Object> {

CDI eyes only
	public Translator() {
	public Translator(ResourceBundle bundle) {
		this. = bundle;
	public boolean containsKey(Object key) {
		return !.getString(key.toString()).equals("???" + key.toString() + "???");
	public Message get(Object key) {
		return new Message(key.toString());

All methods from java.util.Map that were not override by Translator will call delegate() This way all methods that were not override will throw java.lang.UnsupportedOperationException
	protected Map<Class<?>, Objectdelegate() {
		throw new UnsupportedOperationException("A i18n translator does not support this method");
New to GrepCode? Check out our FAQ X