Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java. Never write another getter or equals method again, with one annotation your class has a fully featured builder, automate your logging variables, and much more.
—
Local variable type inference for cleaner, more readable code with automatic type detection.
public final class val {
private val() {}
}public final class var {
private var() {}
}Usage Examples:
import lombok.val;
import lombok.var;
public class Example {
public void demonstrateTypeInference() {
val name = "John Doe"; // final String name = "John Doe";
val age = 30; // final int age = 30;
val users = new ArrayList<User>(); // final ArrayList<User> users = ...
var counter = 0; // int counter = 0;
var message = "Hello"; // String message = "Hello";
counter++; // OK - var is mutable
// name = "Jane"; // Compilation error - val is final
}
}Install with Tessl CLI
npx tessl i tessl/maven-org-projectlombok--lombok