Questions about jigsaw API

Mike Ershov mikhail.ershov at oracle.com
Mon Jan 23 10:39:16 PST 2012


Hello,

I'm adapting sigtest tool ( sigtest.java.net ) to jigsaw and have some 
questions about jigsaw API:

1) I need to read class bytes for any particular class and all its 
dependencies. In other words for module com.acme.mod at 3.1 I have to 
analyze com.acme.mod at 3.1's classes, their superclasses from other 
com.acme.* modules recursively and their platform superclasses including 
java.lang.Object. Maybe I missed something but I can't find easy way to 
do it. So I resolve all dependencies manually. This is my the main 
question. I very appreciate any recommendations.

2) org.openjdk.jigsaw.Library  byte[] readClass(ModuleId mid,  
java.lang.String className) according to the javadoc "reads the class 
bytes of the given class within the given module, in this library or in 
a parent library." But actually it doesn't read a parent library. Please 
correct the description or, better, add this functionality.

3) I expected that 
SimpleLibrary.openSystemLibrary().readClass(Platform.bootModule(), 
"java.lang.Object") returns Object's bytes. It returns null because 
Platform.bootModule() is "jdk.base at 8-ea" instead of "jdk.boot at 8-ea".

4) I noticed that public org.openjdk.jigsaw.LoaderPool has no public 
constructors. If there is no reasons for such design it's better to do 
it not public ( like LibraryPool ) or make them all public.

Thanks in advance,

Mike



More information about the jigsaw-dev mailing list