UTBotJava icon indicating copy to clipboard operation
UTBotJava copied to clipboard

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

Open IlyaMuravjov opened this issue 3 years ago • 0 comments

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 avatar Sep 06 '23 14:09 IlyaMuravjov