In most cases it's easier to pass the classname then to create an instance of the class, pass it to the function only to get the name of the class from the instance.