Add removeMethod method in ClassGenerator