The idea here is to generate the files ONLY when `autoGenerate` is true. Eventually, we could plug in some logic (from another class, since there's quite some duplication as you can see) to reproduce what was done in doctrine/common#291