Repolode
google

google/auto

A set of Java annotation-processing code generators, including AutoValue, AutoFactory, AutoService and Common helpers.

Stars
10,560
Forks
1,227
Open issues
88
Last commit
yesterday

What is it?

Auto is a collection of source code generators for Java, aimed at mechanical and repetitive code that is tedious to write and maintain by hand. Each subproject runs as an annotation processor at compile time and produces the Java source you would otherwise write yourself.

AutoValue generates immutable value-type classes for Java 8 and later. AutoFactory generates JSR-330-compatible factory classes. AutoService generates the provider-configuration files that ServiceLoader reads. Common provides helper utilities for writing annotation processors.

The subprojects are published separately to Maven Central, so you can add only the generators you need to a build.

Key features

  • 01AutoValue generates immutable value classes for Java 8+.
  • 02AutoFactory generates JSR-330-compatible factories.
  • 03AutoService generates ServiceLoader provider-configuration files.
  • 04Common offers helper utilities for annotation processors.
  • 05Each subproject is published separately to Maven Central.

Use cases

  • Replacing hand-written equals, hashCode and builder boilerplate for immutable data classes.
  • Generating factory classes that inject dependencies with JSR-330 annotations.
  • Registering service implementations for ServiceLoader without editing META-INF files manually.
  • Building custom annotation processors on top of shared helper utilities.

Topics

#java#code-generation#annotation-processing#immutable#dependency-injection#maven

FAQ

What is auto?
A set of Java annotation-processing code generators, including AutoValue, AutoFactory, AutoService and Common helpers. Auto is a collection of source code generators for Java, aimed at mechanical and repetitive code that is tedious to write and maintain by hand. Each subproject runs as an annotation processor at compile time and produces the Java source you would otherwise write yourself.
Is auto free to use? What license does it have?
auto is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is auto still maintained?
Actively maintained. The last commit to auto was on Nov 6, 2026.
What can I use auto for?
Replacing hand-written equals, hashCode and builder boilerplate for immutable data classes. Generating factory classes that inject dependencies with JSR-330 annotations. Registering service implementations for ServiceLoader without editing META-INF files manually. Building custom annotation processors on top of shared helper utilities.
Where can I get auto?
The source code and installation instructions are on GitHub: https://github.com/google/auto

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects