getClassFromName method update