Obtain class name in method visitor for identifying loops