hg: penrose/jigsaw/jdk: Initial support for JSON-based module descriptor.
david.bosschaert at gmail.com
david.bosschaert at gmail.com
Fri May 11 02:30:03 PDT 2012
Changeset: 507fae0a1d80
Author: davidb
Date: 2012-05-11 09:30 +0100
URL: http://hg.openjdk.java.net/penrose/jigsaw/jdk/rev/507fae0a1d80
Initial support for JSON-based module descriptor.
The JSON module descriptor is located inside the module in META-INF/module-info.json. The existing module-info.class file is still supported but if a module-info.json file is found this is used instead.
The commit contains a very small JSON parser, its class files are currently <10kb, and it can possibly be made even smaller.
Besides the unit tests _JSONParser and _ModuleInfoReader there is also a system-level test hello-json.sh that compiles, installs and runs a small demot with JSON module metadata. For example module-info.json files see inside hello-json.sh.
Note that not all features of module-info.class are yet supported, this is just a starting point.
! make/java/java/FILES_java.gmk
+ src/share/classes/java/lang/module/JSONModuleInfoReader.java
+ src/share/classes/java/lang/module/JSONParser.java
! src/share/classes/java/lang/module/ModuleClassLoader.java
! src/share/classes/java/lang/module/ModuleSystem.java
! src/share/classes/org/openjdk/jigsaw/Library.java
! src/share/classes/org/openjdk/jigsaw/Loader.java
! src/share/classes/org/openjdk/jigsaw/SimpleLibrary.java
+ test/java/lang/module/_JSONParser.java
! test/java/lang/module/_ModuleInfoReader.java
! test/java/lang/module/module-info-reader.sh
! test/org/openjdk/jigsaw/MockLibrary.java
+ test/org/openjdk/jigsaw/hello-json.sh
! test/org/openjdk/jigsaw/tester.sh
More information about the penrose-dev
mailing list