01: /*
02: * @(#)AutoloadHook.java 1.2 04/12/06
03: *
04: * Copyright (c) 1997-2003 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.lang;
10:
11: /**
12: * This interface defines how to find the value of a undefined variable.
13: * Instances of this interface can be registered with
14: * <tt>Package.autoload(String name, AutoloadHook loadHook, Context context)</tt>.
15: *
16: * @version 1.1
17: */
18: public interface AutoloadHook {
19:
20: /**
21: * When a registered name is first accessed and the name has not been
22: * defined, this method of a corresponding AutoloadHook object is called.
23: *
24: * @param name
25: * the name to be defined by autoloading
26: * @param context
27: * the context with which the name is accessed.
28: */
29: public void load(String name, Context context);
30: }
|