33 class Modules : AllStatic {
34
35 public:
36 // define_module defines a module containing the specified packages. It binds the
37 // module to its class loader by creating the ModuleEntry record in the
38 // ClassLoader's ModuleEntry table, and creates PackageEntry records in the class
39 // loader's PackageEntry table. As in JVM_DefineClass the jstring format for all
40 // package names must use "/" and not "."
41 //
42 // IllegalArgumentExceptions are thrown for the following :
43 // * Module's Class loader is not a subclass of java.lang.ClassLoader
44 // * Module's Class loader already has a module with that name
45 // * Module's Class loader has already defined types for any of the module's packages
46 // * Module_name is syntactically bad
47 // * Packages contains an illegal package name
48 // * A package already exists in another module for this class loader
49 // * Module is an unnamed module
50 // * num_packages is negative
51 // * num_packages is non-zero when packages is null
52 // NullPointerExceptions are thrown if module is null.
53 static void define_module(jobject module, jstring version,
54 jstring location, const char* const* packages,
55 jsize num_packages, TRAPS);
56
57 // Provides the java.lang.Module for the unnamed module defined
58 // to the boot loader.
59 //
60 // IllegalArgumentExceptions are thrown for the following :
61 // * Module has a name
62 // * Module is not a subclass of java.lang.Module
63 // * Module's class loader is not the boot loader
64 // NullPointerExceptions are thrown if module is null.
65 static void set_bootloader_unnamed_module(jobject module, TRAPS);
66
67 // This either does a qualified export of package in module from_module to module
68 // to_module or, if to_module is null, does an unqualified export of package.
69 // The format for the package name must use "/' not ".".
70 //
71 // Error conditions causing IlegalArgumentException to be throw :
72 // * Module from_module does not exist
73 // * Module to_module is not null and does not exist
|
33 class Modules : AllStatic {
34
35 public:
36 // define_module defines a module containing the specified packages. It binds the
37 // module to its class loader by creating the ModuleEntry record in the
38 // ClassLoader's ModuleEntry table, and creates PackageEntry records in the class
39 // loader's PackageEntry table. As in JVM_DefineClass the jstring format for all
40 // package names must use "/" and not "."
41 //
42 // IllegalArgumentExceptions are thrown for the following :
43 // * Module's Class loader is not a subclass of java.lang.ClassLoader
44 // * Module's Class loader already has a module with that name
45 // * Module's Class loader has already defined types for any of the module's packages
46 // * Module_name is syntactically bad
47 // * Packages contains an illegal package name
48 // * A package already exists in another module for this class loader
49 // * Module is an unnamed module
50 // * num_packages is negative
51 // * num_packages is non-zero when packages is null
52 // NullPointerExceptions are thrown if module is null.
53 static void define_module(jobject module, jboolean is_open, jstring version,
54 jstring location, const char* const* packages,
55 jsize num_packages, TRAPS);
56
57 // Provides the java.lang.Module for the unnamed module defined
58 // to the boot loader.
59 //
60 // IllegalArgumentExceptions are thrown for the following :
61 // * Module has a name
62 // * Module is not a subclass of java.lang.Module
63 // * Module's class loader is not the boot loader
64 // NullPointerExceptions are thrown if module is null.
65 static void set_bootloader_unnamed_module(jobject module, TRAPS);
66
67 // This either does a qualified export of package in module from_module to module
68 // to_module or, if to_module is null, does an unqualified export of package.
69 // The format for the package name must use "/' not ".".
70 //
71 // Error conditions causing IlegalArgumentException to be throw :
72 // * Module from_module does not exist
73 // * Module to_module is not null and does not exist
|