Skip to content

Conversation

@marcus-talbot42
Copy link
Contributor

Introduced @BeanFactoryMethod annotation for defining static factory methods, enabling more flexible object instantiation during mapping. New classes like FactoryMethodBeanInitializer and FactoryMethodAwareBeanInitializer handle these methods, with fallback to default constructors when absent. Test cases verify factory method support and integration with complex mappings.

Closes #183

Introduced `@BeanFactoryMethod` annotation for defining static factory methods, enabling more flexible object instantiation during mapping. New classes like `FactoryMethodBeanInitializer` and `FactoryMethodAwareBeanInitializer` handle these methods, with fallback to default constructors when absent. Test cases verify factory method support and integration with complex mappings.
@sonarqubecloud
Copy link

@marcus-talbot42 marcus-talbot42 changed the title Add support for factory methods in BeanMapper initialization [DRAFT] Add support for factory methods in BeanMapper initialization May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support bean-initialisation through static factory methods.

2 participants