01: /*
02: * @(#)Executable.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: * Common interface for executable objects
13: *
14: * Objects that represents parsed/compiled scripts implement this interface, so
15: * that they can be executed by calling run(Context) method.
16: */
17: public interface Executable {
18:
19: /**
20: * Executes the executable object;
21: *
22: * @param context
23: * the context in which the script is executed
24: * @return the result of the execution
25: */
26: public Object run(Context context);
27: }
|