Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Disabling auto-generated method -- Refactoring JavaClassGenerator #1529
Several templates in UmpleToJava/UmpleTLTemplates do business logic such as generating class constructors, getters and setters. Let's take class attributes as an example:
This is not the ideal case. A generators in Umple should be lightweight. It should translate UmpleModel to a target language.
The business logic in generators should be refactored and moved to UmpleInternalPraser. Therefore, UmpleModel should contain all auto-generated methods after parsing.
Although currently some logic such as obtaining constructors, getters and setters of class attributes are represented (added) in UmpleClass model after parsing, they have nothing to do with the generated code. The (Java) generator will produce constructors, setters and getters again (regardless of what UmpleClass model contains).
Disabling auto-generated methods is not possible after parsing (at current state). A refactoring of the generator code is a per-request step.