Skip to content

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

Open
@IlyaMuravjov

Description

@IlyaMuravjov

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.

Metadata

Metadata

Assignees

Labels

comp-codegenIssue is related to code generatorcomp-springIssue is related to Spring projects supportctg-refactoringIssue related to refactoring process

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions