Java Minutiae - Class.toString()Class.toString() doesn't return what you'd expect:
Instead, it prefixes the fully-qualified classname with "class " for classes, "interface " for interfaces and probably "enum " and "annotation " elsewhere. You need to call
getSimpleName()to get what you usually want.
What can I learn from this? The
toString()value is important to the usability of an API. With
toString, it's often better to be terse rather than complete.