In reply to DVCoder:
If you are using the OVM/UVM, get_type_name() returns the string used to register it with the factory.