1
2
3
4
5
6
7
8
9
10 package nl.tudelft.dsol.introspection;
11
12 import nl.tudelft.dsol.introspection.beans.SubTestBean2;
13 import nl.tudelft.simulation.introspection.Property;
14 import nl.tudelft.simulation.introspection.beans.BeanIntrospector;
15 import nl.tudelft.simulation.logger.Logger;
16
17 /***
18 * A test program for the JavaBean introspection implementation.
19 * <p>
20 * (c) copyright 2003-2004 <a href="http://www.simulation.tudelft.nl">Delft
21 * University of Technology </a>, the Netherlands. <br>
22 * See for project information <a
23 * href="http://www.simulation.tudelft.nl">www.simulation.tudelft.nl </a> <br>
24 * License of use: <a href="http://www.gnu.org/copyleft/gpl.html">General Public
25 * License (GPL) </a>, no warranty <br>
26 *
27 * @author <a
28 * href="http://web.eur.nl/fbk/dep/dep1/Introduction/Staff/People/Lang">Niels
29 * Lang </a><a
30 * href="http://www.tbm.tudelft.nl/webstaf/peterja/index.htm">Peter
31 * Jacobs </a>
32 * @version 1.1 Apr 15, 2004
33 * @since 1.4
34 */
35 public final class PTestBeans
36 {
37 /***
38 * constructs a new PTestBeans
39 */
40 private PTestBeans()
41 {
42 super();
43
44 }
45
46 /***
47 * executes the PTestBeans
48 *
49 * @param args the commandline arguments
50 */
51 public static void main(final String[] args)
52 {
53 Property[] props = (new BeanIntrospector())
54 .getProperties(new SubTestBean2());
55 for (int i = 0; i < props.length; i++)
56 {
57 Logger.info(PTestBeans.class, "main", "Prop name: "
58 + props[i].getName());
59 Logger.info(PTestBeans.class, "main", "Prop class: "
60 + props[i].getType());
61 Logger.info(PTestBeans.class, "main", "Prop value: "
62 + props[i].getValue());
63 }
64 }
65 }