How do I define within a mapping file the different types of object a collection member can hold?

 

So I have….

 

Class myClass {

  private ArrayList mylist = new ArrayList();

  public void add(Object obj) {

    myList.add(obj);

  }

}

 

myClass my = new myClass();

my.add(new String(“Hello”));

my.add(new Integer(1));

my.add(new SomeOfObject());

 

 

How do I tell Castor to us the correct mapping class for each?

 

J

Reply via email to