In reply to swathi allenki:
Compiler directives are pre-processor stuff and hence can’t be used in the way you are looking for. UVM library already has this feature for you - it is called uvm_sequence_library, use that.
Regards
Srini
www.go2uvm.org