Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package br.com.caelum.vraptor.i18n;
 
 import java.util.Map;
 
 
@Named("t")
public class Translator extends ForwardingMap<Class<?>, Object> {

Deprecated:
CDI eyes only
	public Translator() {
		this(null);
	}
	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