why do we need getEnclosingClass? I guess  class.getName() is good enough.