Generic classes and methods generator