In reply to saritr:
Declare and get factory using,
class axi_test extends uvm_test;
uvm_factory factory;
uvm_coreservice_t cs = uvm_coreservice_t::get();
function void end_of_elaboration_phase(uvm_phase phase);
super.end_of_elaboration_phase(phase);
this.print();
factory = cs.get_factory();
factory.print();
endfunction