import org.apache.commons.beanutils.PropertyUtils;
public class Prop { public static void main(String[] args) throws Exception { Bean0 b0 = new Bean0(); PropertyUtils.setProperty(b0, "id", new Long(10)); PropertyUtils.setProperty(b0, "name", "John"); PropertyUtils.setProperty(b0, "age", 20); System.out.println(b0); } }