CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-org-projectlombok--lombok

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.

Pending
Overview
Eval results
Files

type-inference.mddocs/

Type Inference

Local variable type inference for cleaner, more readable code with automatic type detection.

Capabilities

val - Final Local Variables

public final class val {
    private val() {}
}

var - Mutable Local Variables

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

docs

builder-pattern.md

constructors.md

data-classes.md

experimental.md

immutable-patterns.md

index.md

logging.md

object-methods.md

property-access.md

type-inference.md

utilities.md

tile.json