I think there are reasons to use a switch statement. If you are using xText generated Code perhaps. Or another kind of EMF generated classes.
instance.getClass().getName();
returns a String of the Class Implementation Name. i.e: org.eclipse.emf.ecore.util.EcoreUtil
instance.getClass().getSimpleName();
returns the simple represenation i.e: EcoreUtil