A Java bean mapper that generates mapping code at compile time to eliminate runtime mapping errors.
Selma is a Java bean mapping library that generates mapping code at compile time using annotation processing. It solves the problem of runtime mapping errors by validating and generating all mapping logic during compilation, ensuring type safety and performance. The library provides both immutable mappings (creating new instances) and update mappings (modifying existing instances) for flexible data transformation.
Java developers who need to map data between different bean structures, particularly those working on applications where runtime mapping errors are costly and type safety is critical.
Developers choose Selma because it eliminates runtime mapping errors by catching issues at compile time, provides better performance by avoiding reflection, and offers a simple, annotation-driven API that integrates seamlessly into Java builds.
Selma Java bean mapping that compiles
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Selma validates all mappings during compilation and breaks the build on errors, preventing runtime failures as emphasized in the README's 'Break build when mapping does not work' feature.
By generating Java code at compile time instead of using runtime reflection, Selma eliminates overhead, leading to faster data transformations as highlighted in the compile-time approach.
It handles nested beans, collections, maps, and enums, allowing complex data structures to be mapped seamlessly, per the features list in the README.
Users can define custom type-to-type mappings in the interface with compile-time checks, as supported by the 'Support Type to Type custom mapping' feature.
Requires annotation processor setup in the build configuration (e.g., Maven scopes), which can be error-prone and may cause IDE integration headaches, as hinted by the 'Help needed' note in the README.
Mappings are fixed at compile time; Selma cannot adapt to runtime changes in bean structures or logic, limiting dynamic use cases compared to reflection-based libraries.
With the README acknowledging 'Help needed' and fewer resources than alternatives like MapStruct, Selma has a smaller community and potentially less documentation or support.