Will a UVM class be registered in factory in such scenario?

In reply to Frank.Wang:

If a package is not imported anywhere, then the answer should be no. However, there might be differences in behavior by the various simulators.