Home /Modules/java/README.md

README.md

lib/java/jdk-28/README.md · 169 line(s) · markdown

/lib/java/jdk-28: Java SE / JDK 28 as SLeeLa, one file per Java type

/lib/java/jdk-28 holds one SLeeLa file for every public type in the Java SE 28 & JDK 28 API (early access). The rule is 1:1: one Java type, one SLeeLa file.

Each file names its Java Source, which is the JDK 28 API page for that type. The SLeeLa functions in the file are produced from that Source. No Java source text is copied or expanded into the repository.

Layout: the same folders as the online API

Every module of the online JDK 28 API has a folder directly under lib/java/jdk-28/, and every package has its folders under its module:

Online JDK 28 API (.../jdk28/docs/api/)SLeeLa file
java.base/java/util/ArrayList.htmllib/java/jdk-28/java.base/java/util/ArrayList.sleela
java.base/java/util/Map.Entry.htmllib/java/jdk-28/java.base/java/util/Map.Entry.sleela
java.sql/java/sql/Connection.htmllib/java/jdk-28/java.sql/java/sql/Connection.sleela
jdk.zipfs/module-summary.htmllib/java/jdk-28/jdk.zipfs/module-summary.md

The index files:

Loader rule. The /lib loader finds a class by file name, so impl/frontend/driver.cpp treats java/jdk-28/ as a reference tier, the same as docs/api/. When a real library unit of that name exists, for example lib/java/java/util/ArrayList.sleela, the real unit wins. These files never make an existing program ambiguous. working-binaries/sleela was rebuilt with this rule.

Not created:

What each file contains

<< lib/java/jdk-28/java.base/java/util/ArrayList.sleela
   SLeeLa file for the Java type java.util.ArrayList (module java.base). One Java type, one SLeeLa file.
   Java Source (JDK 28 API): https://download.java.net/java/early_access/jdk28/docs/api/java.base/java/util/ArrayList.html
   Java kind: class; extends java.util.AbstractList; implements java.util.List, ...
   Status: members from the JDK 28 API (exact signatures). >>
#sleela 3.0
material;

class ArrayList<E> {
  ... Metadata Class metapattern (11 attributes) ...
  String javaType = "java.util.ArrayList";
  String javaSource = "https://download.java.net/java/early_access/jdk28/docs/api/java.base/java/util/ArrayList.html";
  ... java declarations: constants with real values, fields, complete enums and records ...
  ... java constructors and java signatures: every public/protected member, exact Java signature ...
}

A member whose SLeeLa logic is not written yet throws AbstractMethodError (abstract) or UnsupportedOperationException naming the Java signature. Writing the logic means replacing that body with SLeeLa code that does what the Java Source specifies.

Inventory (generated 2026-11-12)

MeasureCount
JDK 28 public types4,721
SLeeLa files in /lib/java/jdk-284,721 (1:1)
Module folders58 (42 with types, 16 without packages)
Folders in all386
Kinds2,856 classes, 1,590 interfaces, 157 enums, 50 annotations, 3 records, 65 not yet classified
Files with API members written4,656
Files with members pending65
Constructors with exact signatures4,496
Methods with exact signatures36,536
Members with working SLeeLa logic4,123 in 849 hand-implemented types (measured 2026-11-12 by jdk-25/tools/jdk_api_coverage.py --tier jdk-28; 8.0% of the 51,554 API members; report in ../COVERAGE-JDK28.md)

Largest modules

ModuleTypesMembers pending
java.base1,63812
java.desktop1,4137
java.xml1940
java.management1900
jdk.compiler1471
java.compiler1460
jdk.jdi1310
java.naming1020
jdk.xml.dom890
java.sql740
jdk.incubator.vector2323
jdk.incubator.json1010

Where the data comes from

Tools (run from the repository root)

python3 lib/java/jdk-28/tools/generate_jdk28.py   # (re)write every file, INDEX.tsv and MODULES.tsv
python3 lib/java/jdk-28/tools/validate_jdk28.py   # enforce the 1:1 rule and the Source links
bash    lib/java/jdk-28/tools/check_jdk28.sh 8    # compile-check every file; report in CHECK-REPORT.txt

generate_jdk28.py rewrites generated files only. A file that contains a < ---- BEGIN java implementation ---- > block holds hand-written SLeeLa logic and is never overwritten.

Generics: the SLeeLa method (erasure)

The files use the SLeeLa generics method of SLEELA.syntax 16.3 and 38.1, not the Java spelling (ArrayList<String>):

No VM change was made for this. examples/java/jdk-28/GenericsRun.sleela runs it.

Licensing

The Java API is by Oracle and the OpenJDK community, under GPLv2 with the Classpath Exception. Each file records that in its metadata (metaCopyright, metaCorporation). Java is a trademark of Oracle.