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