1
2
3
4
5
6
7
8
9
10 package nl.tudelft.simulation.introspection;
11
12 /***
13 * The introspector provides introspection services, i.e. property discovery and
14 * manipulation, for any object.
15 * <p>
16 * (c) copyright 2003-2004 <a href="http://www.simulation.tudelft.nl">Delft
17 * University of Technology </a>, the Netherlands. <br>
18 * See for project information <a
19 * href="http://www.simulation.tudelft.nl">www.simulation.tudelft.nl </a> <br>
20 * License of use: <a href="http://www.gnu.org/copyleft/gpl.html">General Public
21 * License (GPL) </a>, no warranty <br>
22 *
23 * @author <a
24 * href="http://web.eur.nl/fbk/dep/dep1/Introduction/Staff/People/Lang">Niels
25 * Lang </a><a
26 * href="http://www.tbm.tudelft.nl/webstaf/peterja/index.htm">Peter
27 * Jacobs </a>
28 * @version 1.1 Apr 15, 2004
29 * @since 1.4
30 */
31 public interface Introspector
32 {
33 /***
34 * @param introspected the introspected object
35 * @return Retrieves properties of the introspected object. The properties'
36 * values can themselves be introspectable. An empty array is
37 * returned if no introspected object has been set.
38 */
39 Property[] getProperties(Object introspected);
40
41 /***
42 * Retrieves the names of the properties of the introspected object.
43 *
44 * @param introspected The introspected object.
45 * @return An unordered array of the introspected object's property names.
46 */
47 String[] getPropertyNames(Object introspected);
48
49 /***
50 * Retrieves the {see Property}with a given name from an introspected
51 * object.
52 *
53 * @param introspected The introspected object.
54 * @param property The name of the property to be retrieved
55 * @return A {see Property}instance for the given object and property name.
56 */
57 Property getProperty(Object introspected, String property);
58 }