1 /*
2 * Created on 09.03.2004
3 */
4 package org.xpcards.model;
5
6 import java.beans.BeanInfo;
7 import java.beans.Encoder;
8 import java.beans.Introspector;
9 import java.beans.PropertyDescriptor;
10
11 /***
12 * @author galu02
13 */
14 public class ProjectSourcePersistenceDelegate extends BasePersistenceDelegate {
15
16 protected void initialize(
17 Class type,
18 Object oldInstance,
19 Object newInstance,
20 Encoder out) {
21 try {
22 BeanInfo info = Introspector.getBeanInfo(oldInstance.getClass());
23
24 // System.err.println("Project Source :" + info );
25
26 PropertyDescriptor[] d = info.getPropertyDescriptors();
27 for (int i = 0; d != null && i < d.length; i++) {
28 // System.err.println("Property :" + d[i].getName());
29 // System.err.println("Property setter:" + d[i].getWriteMethod());
30 doProperty(
31 oldInstance.getClass(),
32 d[i],
33 oldInstance,
34 newInstance,
35 out);
36 }
37 } catch (Exception e) {
38 e.printStackTrace();
39 }
40 }
41 }
This page was automatically generated by Maven