separated constructor and class properties in java generator