Use generated class directly instead of creating from string