SystemVerilog has no automated way of doing this. If you want to look at the UVM, it has the infrastructure to do this for a limited number of types using a combination of macros and methods in its base class library.
Thank you Dave for your response.
I am okay to with UVM as well. Can you provide some more details on the macros/methods? If any reference is available then please point me as well.