magic-bean
record-builder
Our great sponsors
magic-bean | record-builder | |
---|---|---|
15 | 35 | |
70 | 650 | |
- | - | |
3.7 | 7.3 | |
1 day ago | 17 days ago | |
Java | Java | |
GNU General Public License v3.0 or later | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
magic-bean
-
Searching a specific annotation processing library
I like to use Magic Bean for this kind of stuff if I can't use records for some reason.
-
Java is your preferred language, but if you could press a button...
I recently stumbled upon https://github.com/bowbahdoe/magic-bean . This would be an example of solving developer needs - compatibly with the jdk way but currently ugly. Maybe we can make it nicer in the future somehow?
-
Should you still be using Lombok?
I think Hibernate / cases where real getters and setters are desired are the remaining usecase. The code generator I published however long ago handles specifically that boilerplate, but its Java 17+ only. https://github.com/bowbahdoe/magic-bean
- Any suggestions for good open source Java codebases to study(With below criteria)?
- has anyone written custom annotations using Lombok ?
-
Akka move from Apache v2 license to BSL
For those anemic models, when they are called for (JPA) - https://github.com/bowbahdoe/magic-bean
- What's your top Java pet peeve?
-
[ANN] RecordBuilder v33 Released
And if you want non-magic getters and setters there is this: https://github.com/bowbahdoe/magic-bean
- Do you think Java will some day finally remove the need of Lombok's @Data annotation?
- Magic Beans - automatic get/set, equals, hashCode, toString without any compiler hacks
record-builder
-
JEP Draft – Derived Record Creation (Preview) – Java
The problem with this approach is that the people will have to build crutches like https://github.com/Randgalt/record-builder and by the time Java adds missing features all the codebases will be forever polluted with legacy workarounds that nobody will dare to remove because of backwards compatibility.
It also hinders adoption of new features as people will prefer to maintain consistency in their codebases.
-
Any library you would like to recommend to others as it helps you a lot? For me, mapstruct is one of them. Hopefully I would hear some other nice libraries I never try.
Record builder is pretty good for making builders for your Java 17 records
-
Useful & Unknown Java Libraries - Piotr's TechBlog
I always have to bring up RecordBuilder simply because of the included Withers and it being a source generator instead of the Lombok weirdness.
-
How to use Java Records
The above is not particularly user-friendly. Luckily compiler plugins can provide the missing feature, most notably RecordBuilder:
-
Named Parameters in Java
For records, instead of lombok you can use https://github.com/Randgalt/record-builder which is a valid annotation processor and will not break on JDK changes
-
has anyone written custom annotations using Lombok ?
In this particular case you can generate the builder with something like https://github.com/Randgalt/record-builder that is both valid java and lombok-like enough
-
I made a java client for the todoist api
Records + Record Builder or immutables + the trick to hide the implementing class w/sealed are your friend. Both the mutability and naming conventions this generates are vomitus.
-
"With" for records -- Brian Goetz
Did you use https://github.com/Randgalt/record-builder ?
-
What's your top Java pet peeve?
Try my annotation processor. It generates withers. https://github.com/Randgalt/record-builder
-
Stay with Java(+Spring) or pivot towards Go/Python?
I personally don't use that one much, but you could use this library instead.
What are some alternatives?
MFL - A Java library for reading and writing MATLAB's MAT File format
MapStruct - An annotation processor for generating type-safe bean mappers
leftright-map-java - A (hopefully) Fast, (hopefully) Thread safe map inspired by evmap
Lombok - Very spicy additions to the Java programming language.
manifold - Manifold is a Java compiler plugin, its features include Metaprogramming, Properties, Extension Methods, Operator Overloading, Templates, a Preprocessor, and more.
awesome-annotation-processing - A curated list of resources related to the Java annotation processing API (JSR 269)
amber-docs - https://openjdk.org/projects/amber
core - An advanced and highly optimized Java library to build frameworks: it's useful for scanning class paths, generating classes at runtime, facilitating the use of reflection, scanning the filesystem, executing stringified source code and much more...
rosie-microhttp - Rosie adapter for microhttp
Immutables - Annotation processor to create immutable objects and builders. Feels like Guava's immutable collections but for regular value objects. JSON, Jackson, Gson, JAX-RS integrations included
gestalt - A Java configuration library that allows you to build your configurations from multiple sources, merges them and convert them into an easy-to-use typesafe configuration class. A simple but powerful interface allows you to navigate to a path within your configurations and retrieve a configuration object, list, or a primitive value.
Jackson JSON Processor - Main Portal page for the Jackson project