package jreport.uds.javabean.beans;
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;

/*
 * Created on Jul 18, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

/**
 * @author jennyw
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class test {
	public static void main(String art[]){
		try {
			BeanInfo propBeanInfo = Introspector.getBeanInfo(Class.forName("Person"));
			
			PropertyDescriptor[] propDescriptor = propBeanInfo.getPropertyDescriptors();
			for( int i =0; i<propDescriptor.length; i++ ){
				System.out.println("Property Name:"+propDescriptor[i].getName());
				System.out.println("Property Class:"+propDescriptor[i].getPropertyType().getName());
				System.out.println("Read Action:"+propDescriptor[i].getReadMethod());
			}
		} catch (IntrospectionException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
	}

}
