01: package gnu.expr;
02:
03: /** The compiler generates extensions of this class.
04: * For each compiler-generated {@code PACKAGE} the
05: * compiler also generates a class {@code PACKAGE.$ModulesMap$}
06: * that extends {@code ModuleSet}.
07: * This is used to register the modules in a given package
08: * with the active {@link ModuleManager}. This is needed for XQuery where
09: * there may be multiple modules with the same namespace URI. To import
10: * all the modules in a given namespace, the compiler maps the
11: * namespace to a package name, makes sure the package's {@code ModuleSet}
12: * is loaded, and then selects those modules whose namespace URI matches.
13: */
14:
15: public abstract class ModuleSet {
16: public static final String MODULES_MAP = "$ModulesMap$";
17:
18: /** Next ModuleSet in list headed by {@link ModuleManager#packageInfoChain}. */
19: ModuleSet next;
20:
21: /** The compiler generates implementations of this method.
22: * Normally, the implementation calls {@link ModuleManager#register}
23: * once for each each module in the current package.
24: */
25: public abstract void register(ModuleManager manager);
26: }
|