Get Type Name with Parameters?

In reply to raysalemi:

class B #(int w=1);
  static string name = $sformatf(“packet%0d”,w);
endclass