Java annotation-processor

Open-source Java projects categorized as annotation-processor

Top 21 Java annotation-processor Projects

annotation-processor
  • MapStruct

    An annotation processor for generating type-safe bean mappers

    Project mention: A single ChatGPT mistake cost us $10k | news.ycombinator.com | 2024-06-09

    > You don't need to make DTOs when you don't have to, using AutoMapper is considered a bad practice and is heavily discouraged (if you do have to use a tool like that, there are alternatives like Mapperly which are zero-cost to use and will give you built-time information on what doesn't map without having to run the application).

    The thing is, that you'll probably have entities mapped against the database schema with data that must only conditionally be shown to the users. For example, when an admin user requests OrderDetails then you'll most likely want to show all of the fields, but when an external user makes that request, you'll only want to show some of the fields (and not leak that those fields even exist).

    DTOs have always felt like the right way to do that, however this also means that for every distinct type of user you might have more than one object per DB table. Furthermore, if you generate the EF entity mappings from the schema (say, if you handle migrations with a separate tool that has SQL scripts in it), then you won't make separate entities for the same table either. Ergo, it must be handled downstream somewhere.

    Plus, sometimes you can't return the EF entities for serialization into JSON anyways, since you'd need to introduce some additional parsing logic, to get them into a shape that the front end wants (e.g. if you have a status field or something, the current value of which is calculated based on 5-10 database fields or other stuff).

    Not to say that some of those can't be worked around, but I can't easily handwave those use cases away either. In Java, MapStruct works and does so pretty well: https://mapstruct.org/ I'd rather do something like that, than ask ChatGPT to transpose stuff from DDL or whatever, or waste time manually doing that.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • parceler

    :package: Android Parcelables made easy through code generation.

  • 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

    Project mention: Unchecked Java: Say Goodbye to Checked Exceptions Forever | news.ycombinator.com | 2023-07-13

    This is every Lombok lover's favorite strawman argument I've run into.

    I've been coding in Java professionally for ~20 years. I can count with zero hands the number of times I've been burned by a getter or setter getting changed into something surprising.

    If you really need auto-generated getters/setters/builders - Immutables [1] is a library that does it using bog standard annotation processing rules that don't require hacking your build process.

    [1] https://github.com/immutables/immutables

  • Shortbread

    Android library that creates app shortcuts from annotations

  • derive4j

    Java 8 annotation processor and framework for deriving algebraic data types constructors, pattern-matching, folds, optics and typeclasses.

  • Doma 2

    DAO oriented database mapping framework for Java 8+

  • pojobuilder

    A Java Code Generator for Pojo Builders

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • Moxy

    Moxy is MVP library for Android with incremental annotation processor and ktx features (by moxy-community)

  • jstachio

    Java type safe statically compiled mustache

    Project mention: Java string interpolation feature was cancelled | news.ycombinator.com | 2024-06-20

    / Generated By:JavaCC: Do not edit this line. QueryParser.java */

    I'm not claiming you're not going to see properties written out. I'm just saying that's not the majority of code you're going to see and to claim that idiomatic Java is all getters and setters is a bit far fetched.

    Here is what I would consider modern idiomatic Java, immutable records and immutable classes that may expose some of their state:

    https://github.com/jstachio/jstachio/blob/main/compiler/apt/...

  • transfuse

    :syringe: Transfuse - A Dependency Injection and Integration framework for Google Android

  • Kripton Persistence Library

    A Java/Kotlin library for Android platform, to manage bean's persistence in SQLite, SharedPreferences, JSON, XML, Properties, Yaml, CBOR.

  • zerocell

    Simple, efficient Excel to POJO library for Java

  • avaje-http

    Controller generation for Javalin, Helidon SE.

    Project mention: Avaje HTTP 2.0 Released | news.ycombinator.com | 2023-10-27
  • elementary

    A suite of libraries that simplify creating and unit testing annotation processors. (by Pante)

  • 1. AutoProxy

    Annotation Processing Library. Generates proxy class on top of interface/abstract class, that allows to intercept calls. Also known as a design pattern: proxy, delegate, interceptor.

  • avaje-prisms

    Upgraded fork of hickory (updated to Java 11 with module-info and new features)

  • net.cactusthorn.config

    Configuration library based on annotation processing

  • spring-multi-data-source

    To mitigate Spring's limitations with multiple data sources in a single service, this library provides two custom annotations in Java that automatically generate all the required bean definition configurations and package-segregated repositories, for each data source.

  • auto-record

    Java record source generator

  • simple-component

    Basic dependency injection tool

  • maven-properties-gen

    Maven Properties Generator for Java

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Java annotation-processor discussion

Log in or Post with

Java annotation-processor related posts

  • Avaje HTTP 2.0 Released

    1 project | news.ycombinator.com | 27 Oct 2023
  • Object mapping libraries

    1 project | /r/Python | 18 Sep 2023
  • Feedback on a new annotation processor api

    9 projects | /r/java | 20 May 2023
  • Mapping in Domain Driven Design sucks

    1 project | /r/javahelp | 6 Feb 2023
  • RIFE2 web framework v1.0.0 released!

    4 projects | /r/java | 21 Jan 2023
  • Correct way of exception handling, an optional?

    1 project | /r/javahelp | 30 Nov 2022
  • What next Springboot?

    1 project | /r/javahelp | 1 Oct 2022
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 23 Jun 2024
    Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →

Index

What are some of the best open-source annotation-processor projects in Java? This list will help you:

Project Stars
1 MapStruct 6,885
2 parceler 3,565
3 Immutables 3,386
4 Shortbread 1,783
5 derive4j 559
6 Doma 2 422
7 pojobuilder 333
8 Moxy 323
9 jstachio 229
10 transfuse 219
11 Kripton Persistence Library 119
12 zerocell 79
13 avaje-http 59
14 elementary 36
15 1. AutoProxy 19
16 avaje-prisms 16
17 net.cactusthorn.config 11
18 spring-multi-data-source 11
19 auto-record 6
20 simple-component 3
21 maven-properties-gen 3

Sponsored
Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com