A new boilerplate code generation in Java

JPlus is a modern programming language and compiler that acts as a superset of Java —
bringing the benefits of null safety and powerful boilderplate code generation declarative features while remaining fully interoperable with existing Java code and libraries.

✨ Why JPlus?

Java is a powerful and battle-tested language, but developers often face:

  • Verbose boilerplate (getters/setters, constructors, etc.)
  • Dangerous NullPointerException
  • Lack of modern language features like ?: (Elvis), smart casts, or pattern matching

JPlus solves this by introducing modern features on top of Java — without breaking compatibility.

JPlus code compiles to standard Java code, enabling full use of Java libraries and frameworks.

🔐 Null Safety & Modern Syntax Features

JPlus enforces strict null checks at compile-time and introduces Kotlin-style operators:

FeatureDescription
Null-safety (Type vs Type?)Explicit non-nullable and nullable types
?.Null-safe access operator
?:Elvis operator for default/fallback values
Named Parameter (planned)Allows passing arguments by name
Async Syntax (planned)Future-ready syntax with async/await support

🔧 NEW: apply Syntax for Replacing Lombok

JPlus introduces the new apply statement — a powerful declarative alternative to Lombok annotations.

🔁 Replace This:

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class User {
    private String name;
    private int age;
}

✅ With This:

apply data, builder, constructors(all, no);  

public class User {     
    private String name;     
    private int age; 
}

💡 Even Nested Classes:

apply data, constructor(required, all, no), builder;  
apply {  
    User.Profile: getter, setter, equality, constructor(all);
}  
  
public class User {  
    private String name;    
    private int age;  
    
    public class Profile {        
        String nickname;    
    }
}

All boilerplate — constructors, getters/setters, toString, equals, builder — generated as plain Java.

For full code and output, see:
Go to Example 6

🔭 Install JPlus IntelliJ Plugin

The JPlus IntelliJ plugin has been officially released on the JetBrains Marketplace.

  • Go to File > Settings > Plugins and search for "JPlus" to install it.

🔗 Learn More

Posted Nov 10, 2025, 12:14 PM UTC

03
Loading comments…