Detect Generator to use through type annotations

Try to use annotations to determine which generator to use to be as close as possible of the original ease of use.