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