Generate adaptor class automatically.