Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate Spring-specific logic from field-declaration-specific logic #2579

Open
IlyaMuravjov opened this issue Sep 6, 2023 · 0 comments
Open
Assignees
Labels
comp-codegen Issue is related to code generator comp-spring Issue is related to Spring projects support ctg-refactoring Issue related to refactoring process

Comments

@IlyaMuravjov
Copy link
Collaborator

Description

Right now CgSpringVariableConstructor seems to be responsible for both:

  • handling Spring-specific types of models;
  • replacing some variables with fields.

The latter of its responsibilities isn't Spring-specific and I think should be extracted to separate decorator of VariableConstructor.

Potential alternatives

Instead of decorating VariableConstructor we can make its constructor accept VariableConstructorContext and decorate VariableConstructorContext instead, which may be easier given the recursive nature of the VariableConstructor that is hard to combine with decorators.

@IlyaMuravjov IlyaMuravjov added comp-codegen Issue is related to code generator ctg-refactoring Issue related to refactoring process comp-spring Issue is related to Spring projects support labels Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-codegen Issue is related to code generator comp-spring Issue is related to Spring projects support ctg-refactoring Issue related to refactoring process
Projects
Status: Todo
Development

No branches or pull requests

2 participants