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

Extract common value generator out of BeanDefinitionPropertyValueCodeGenerator #28999

Closed
snicoll opened this issue Aug 23, 2022 · 1 comment
Closed
Assignees
Labels
theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Milestone

Comments

@snicoll
Copy link
Member

snicoll commented Aug 23, 2022

When writing custom code, it's handy to be able to pass basic types and let something generate a CodeBlock for us. Having to deal with the attribute being null (and then writing null) is also something that should be reusable.

@snicoll snicoll added type: enhancement A general enhancement theme: aot An issue related to Ahead-of-time processing labels Aug 23, 2022
@snicoll snicoll added this to the 6.0.x milestone Aug 23, 2022
@jhoeller jhoeller modified the milestones: 6.0.x, 6.1.x Feb 14, 2023
@snicoll
Copy link
Member Author

snicoll commented Oct 17, 2023

Perhaps a ValueCodeGenerator interface with a default implementation that can load customizations from the classpath could a good first step. Looking at this need, it matches what #31427 is requesting. Devil in the details if we move this to spring-core I am sure but we'll see how far we can go.

@snicoll snicoll modified the milestones: 6.1.x, 6.2.x Oct 17, 2023
@snicoll snicoll self-assigned this Oct 21, 2023
snicoll added a commit to snicoll/spring-framework that referenced this issue Oct 21, 2023
This commit introduces ValueCodeGenerator and its Delegate interface
as a way to generate the code for a particular value. Implementations
in spring-core provides support for common value types such a String,
primitives, Collections, etc.

Additional implementations are provided for code generation of bean
definition property values.

Closes spring-projectsgh-28999
snicoll added a commit to snicoll/spring-framework that referenced this issue Oct 23, 2023
This commit introduces ValueCodeGenerator and its Delegate interface
as a way to generate the code for a particular value. Implementations
in spring-core provides support for common value types such a String,
primitives, Collections, etc.

Additional implementations are provided for code generation of bean
definition property values.

Closes spring-projectsgh-28999
@snicoll snicoll modified the milestones: 6.2.x, 6.1.2 Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants