package nl.tudelft.dsol.introspection; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import nl.tudelft.dsol.introspection.beans.SubTestBean2; import nl.tudelft.simulation.introspection.Property; import nl.tudelft.simulation.introspection.beans.BeanIntrospector; /** * A test program for the JavaBean introspection implementation. *
* (c) 2002-2018-2004 Delft University of Technology , the
* Netherlands.
* See for project information www.simulation.tudelft.nl
* License of use: Lesser General Public License (LGPL) , no
* warranty.
* @author Niels Lang Peter Jacobs
* @version 1.1 Apr 15, 2004
* @since 1.5
*/
public final class IntrospectionBeansTest
{
/** the logger./ */
private static Logger logger = LogManager.getLogger(IntrospectionBeansTest.class);
/**
* constructs a new PTestBeans.
*/
private IntrospectionBeansTest()
{
super();
// unreachable code;
}
/**
* executes the PTestBeans
* @param args the commandline arguments
*/
public static void main(final String[] args)
{
Property[] props = (new BeanIntrospector()).getProperties(new SubTestBean2());
for (int i = 0; i < props.length; i++)
{
logger.info("main", "Prop name: " + props[i].getName());
logger.info("main", "Prop class: " + props[i].getType());
logger.info("main", "Prop value: " + props[i].getValue());
}
}
}