01: /*
02: * @(#)init.java 1.2 04/12/06
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
07: * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
08: */
09: package pnuts.beans;
10:
11: import pnuts.lang.Runtime;
12: import pnuts.lang.Package;
13: import pnuts.lang.Context;
14: import pnuts.ext.ModuleBase;
15:
16: /**
17: * Initialization of the pnuts.beans module
18: */
19: public class init extends ModuleBase {
20:
21: static String[] javaFunctions = { "getBeanProperty",
22: "setBeanProperty", "getBeanProperties",
23: "setBeanProperties", "bind", "unbind", "encodeBean",
24: "decodeBean", "generateBeanClass" };
25:
26: static String[] files = { "pnuts/beans/info" };
27:
28: static String[][] functions = { { "properties", "events",
29: "methods", "listenerMethodNames", "listenerType" } };
30:
31: protected String getPrefix() {
32: return "org";
33: }
34:
35: public Object execute(Context context) {
36: context.clearPackages();
37: for (int i = 0; i < files.length; i++) {
38: autoload(functions[i], files[i], context);
39: }
40: for (int i = 0; i < javaFunctions.length; i++) {
41: autoloadFunction(javaFunctions[i], context);
42: }
43: return null;
44: }
45: }
|