Confused usage of create() method with argument in uvm

Dear All,

I used create method for override.
So I made as the below example.

Basically, as I Know the create method used with argument.
I’m Confused that the purpose of argument. So I made 4 example of argument as the below. There are no error.
So I want to know the purpose of argument and what is the correct Usage and standard for with 4 examples.
Could you please explain it?

I came across the example as below when I googling.

EXAMPLE:
class_type object_name;

object_name = clss_type::type_id::creat("object_name",this);

It seems that argument must have to be same as object name. But In my case, Different cases also has no compile error. Why?


 module example();
 ...

  agent_a agent_a_h;
  agent_c agent_c_h;
  my_uvm_agent handle;

 
  initial begin

    uvm_factory factory;
    factory = uvm_factory::get();
 
    my_uvm_agent::type_id::set_type_override(agent_c::get_type());
    handle = my_uvm_agent::type_id::create("agent_a_h", null); //No Error
    handle = my_uvm_agent::type_id::create("aaa", null);       //No Error 
    handle = my_uvm_agent::type_id::create("my_uvm_agent", null); //No Error
    handle = my_uvm_agent::type_id::create("handle", null); //No Error

    factory.print();

    handle.display();
 
  end
  ...
  endmodule

In reply to UVM_LOVE:

The first argument is the string name of the object. The convention is using the same name as class variable the object gets sorted in. This makes reporting and debugging much easier so that “test_name.env_name.agent_name.driver_name” is the exact same name as you would use to reverence in UVM and you do in SystemVerilog. Some debugging tools take advantage of this naming convention to help UVM-aware debugging further. The UVM code has no way of checking that the string name matches the class variable name. You will not get an error, but it will make it more confusing if you do that.

The second argument is the parent component, usually the component that is creating the object. If you use “null”, the created component becomes a top level component, which is not an error, but goes against the recommended testbench hierachy.