01: /*
02: * @(#)init.java 1.4 05/06/14
03: *
04: * Copyright (c) 2001-2004 Sun Microsystems, Inc. All Rights Reserved.
05: *
06: * See the file "LICENSE.txt" for information on usage and redistribution of
07: * this file, and for a DISCLAIMER OF ALL WARRANTIES.
08: */
09: package pnuts.tools;
10:
11: import pnuts.ext.ModuleBase;
12: import pnuts.lang.Context;
13:
14: public class init extends ModuleBase {
15:
16: static String[] files = { "pnuts/tools/pnutool" };
17:
18: static String[][] functions = { { "pnutool" } };
19:
20: static String[] javaFunctions = { "console", "setThreadClassPath" };
21:
22: static String[] modules = { "pnuts.math", "pnuts.multithread",
23: "pnuts.security", "pnuts.mail", "pnuts.xml", "pnuts.util",
24: "pnuts.awt", "pnuts.beans", "pnuts.text", "pnuts.regex",
25: "pnuts.io", "pnuts.nio", "pnuts.lib", "pnuts.jdbc",
26: "pnuts.jdo", "pnuts.net", "pnuts.jmx", "java.util",
27: "java.io", "java.net" };
28:
29: public String getPrefix() {
30: return "org";
31: }
32:
33: protected String[] getSubModules() {
34: return modules;
35: }
36:
37: public Object execute(Context context) {
38: for (int i = 0; i < files.length; i++) {
39: autoload(functions[i], files[i], context);
40: }
41: for (int i = 0; i < javaFunctions.length; i++) {
42: autoloadFunction(javaFunctions[i], context);
43: }
44: return null;
45: }
46: }
|