this post was submitted on 19 Mar 2026
2 points (75.0% liked)

Programming

26137 readers
333 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

JADEx (Java Advanced Development Extension) is a practical Java safety layer that enhances the safety of your code by providing null-safety and readonly(final-by-default) enforcement. It strengthens Java’s type system without requiring a full rewrite, while fully leveraging existing Java libraries and tools.

As of v0.59, JADEx now ships a Gradle plugin alongside the existing IntelliJ plugin.


What JADEx does

JADEx extends Java at the source level with two core safety mechanisms:

Null-Safety

  • Type → non-nullable by default
  • Type? → nullable
  • ?. → null-safe access operator
  • ?: → Elvis operator (fallback value)
String? name = repository.findName(id);
String upper = name?.toLowerCase() ?: "UNKNOWN";

Compiles to standard Java:

@Nullable String name = repository.findName(id);
String upper = SafeAccess.ofNullable(name).map(t0 -> t0.toLowerCase()).orElseGet(() -> "UNKNOWN");

Readonly (Final-by-Default)

  • A single apply readonly; directive makes fields, local variables, and parameters final by default
  • Explicit mutable modifier for intentional mutability
  • Violations reported as standard Java compile-time errors

What's new in v0.59 - Gradle Plugin

The JADEx Gradle plugin (io.github.nieuwmijnleven.jadex) integrates .jadex compilation into the standard Gradle build lifecycle via a compileJadex task.

plugins {
    id 'io.github.nieuwmijnleven.jadex' version '0.59'
}
  • Default source directory: src/main/jadex
  • Default output directory: build/generated/sources/jadex/main/java
  • Optional jadex {} DSL block for custom configuration
  • IntelliJ plugin now integrates with the Gradle plugin via the Gradle Tooling API for consistent path resolution between IDE and build pipeline
jadex {
    sourceDir = "src/main/jadex"
    outputDir = "build/generated/sources/jadex/main/java"
}

Other Improvements

  • IntelliJ Plugin - Gradle Plugin Integration

    • The IntelliJ plugin now integrates with the JADEx Gradle plugin via the Gradle Tooling API.
    • Source and output directory resolution is now delegated to the Gradle plugin configuration, ensuring consistency between the IDE and the build pipeline.
  • Parser Performance Optimization

    • Improved parser speed by optimizing parser rules.
    • Reduces analysis latency in the IDE, providing a smoother editing experience for large .jadex files.

Design philosophy

JADEx is not a new language. It does not modify the JVM. It operates purely at the source level and generates standard Java code, meaning it is fully compatible with existing Java libraries, tools, and workflows. The goal is to make null-safety and readonly(final-by-default) enforcement practical and incremental, applicable file by file to existing codebases without a full rewrite.


Links

Feedback and questions welcome.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here