1 import java.util.ArrayList; 2 import java.util.Iterator; 3 import java.util.List; 4 import descriptor.*; 5 6 public class Main { 7 public static void main(String[] args){ 8 Main main = new Main(); 9 List list = main.createAttributeDescriptors(); 10 Iterator it = list.iterator(); 11 while(it.hasNext()){ 12 System.out.println("class name is : " + it.next().getClass().getName()); 13 } 14 } 15 16 public List createAttributeDescriptors(){ 17 List result = new ArrayList(); 18 19 result.add(AttributeDescriptor.forInteger("remoteId", getClass())); 20 result.add(AttributeDescriptor.forDate("createDate", getClass())); 21 result.add(AttributeDescriptor.forDate("lastChangeDate", getClass())); 22 result.add(AttributeDescriptor.forReference("createdBy", getClass())); 23 result.add(AttributeDescriptor.forReference("lastChangedBy", getClass())); 24 result.add(AttributeDescriptor.forInteger("optimisticLockVersion", getClass())); 25 26 return result; 27 } 28 }