We should decide a convention for this. I always use a String, you always use canonicalName(). I avoided that because it doesn't work in GWT, and here it doesn't matter, but we will have problems in the engine.