Is there any function to print each members in one trans?

for example I have a item like below.



class my_trans extend uvm_sequence_item;

    bit active;
    logic [9:0]  addr;
    logic [31:0] data;
    
    `uvm_object_utils_begin(my_trans)
        `uvm_field_int(active, UVM_ALL_ON)
        `uvm_field_int(addr, UVM_ALL_ON)
        `uvm_field_int(data, UVM_ALL_ON)
    `uvm_object_utils_end
endclass


Is there any function to print each members of this ‘my_trans’ ? I mean the output of this function would be like below.

active addr data

Thank you for any help !

In reply to zz8318:

Read the UVM Cookbook article on Transaction Methods which describes how to implement all the supporting functions in your transaction.