Froporec

Compile-time annotation processor that transforms your POJOs into deeply-immutable Java Records, ships handy factory methods, and even lets you “extend” final Records – no boilerplate, no runtime cost.

@Record
class Person {
  String name;
  int age;
  // ...
}

// Create new instance of Person POJO class
Person jane = new Person();
jane.setName("Jane");
jane.setAge(28);

// PersonRecord record class generated at compile-time,
// can be instantiated, passing the POJO instance
PersonRecord janeRecord = new PersonRecord(jane); 

// Create new record from existing
PersonRecord youngerJane = jane.with("age", 12);

Why developers ❤️ Froporec

⚡️

Zero runtime cost

Everything happens during compilation via javax.annotation.processing. Your byte-code stays lean; no reflection, no Lombok-style surprises.

🛡️

Deep immutability

Generated records recursively copy collections and nested POJOs to guarantee true immutability & thread-safety.

🚀

Turbo productivity

Factory methods, field constants & record “extension” slash boilerplate and make refactoring trivial.

Get started in 30 seconds

Maven
<dependency>
  <groupId>org.froporec</groupId>
  <artifactId>froporec</artifactId>
  <version>1.4</version>
</dependency>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <configuration>
    <release>17</release>
    <annotationProcessorPaths>
      <path>
        <groupId>org.froporec</groupId>
        <artifactId>froporec</artifactId>
        <version>1.4</version>
      </path>
    </annotationProcessorPaths>
  </configuration>
</plugin>
Gradle (Kotlin DSL)
plugins {
  java
}

dependencies {
  annotationProcessor("org.froporec:froporec:1.4")
  compileOnly("org.froporec:froporec:1.4")
}

java {
  toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}

Using another build tool? Grab the jar →

Screencasts & conference talks

1.4 – Factory Methods (5 min)
Froporec Intro – April 2023 (15 min)

Documentation

Read the full Javadoc →

Or browse concise examples in froporec-annotation-client.

Contribute & feedback

Found a bug or have an idea? Open an issue →

Froporec is released under the MIT License and © 2021-2025 Mohamed Ashraf Bayor.