01: /*
02: * @(#)Property.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: * In Pnuts, access to a property of an object implements this interface causes
13: * a call of methods in this interface. See <a
14: * href="http://pnuts.org/doc/lang.html#sugar">Pnuts Language Specification </a>
15: * for details.
16: *
17: * @version 1.1
18: * @author Toyokazu Tomatsu
19: */
20: public interface Property {
21: /**
22: * This method defines the behavior of the following expression.
23: *
24: * <pre>
25: * <em>
26: * aProperty
27: * </em>
28: * .
29: * <em>
30: * name
31: * </em>
32: * =
33: * <em>
34: * value
35: * </em>
36: * </pre>
37: *
38: * @param name
39: * the <em>name</em>.
40: * @param value
41: * the <em>value</em>.
42: * @param context
43: * the context in which the expression is evaluated.
44: */
45: void set(String name, Object value, Context context);
46:
47: /**
48: * This method defines the behavior of the following expression.
49: * <p>
50: *
51: * <pre>
52: * <em>
53: * aProperty
54: * </em>
55: * .
56: * <em>
57: * name
58: * </em>
59: * </pre>
60: *
61: * </p>
62: *
63: * @param name
64: * the <em>name</em>.
65: * @param context
66: * the context in which the expression is evaluated.
67: */
68: Object get(String name, Context context);
69: }
|