title: Castor: Creating Mapping Files for Classes that have Abstract attributes
body: <p>I have this class:</p>
  
  <pre><code>public class Source extends Node {
    protected DistributionSampler delay ;
    protected DistributionSampler batchsize ;
  
  
  /**
   * @param name The name of the source node
   * @param d The {@link DistributionSampler} used to generate the
   *          inter-arrival times
  */
    public Source( String name, DistributionSampler d ) {
      super( name ) ;
      delay = d ;
      batchsize = new Deterministic( 1 ) ;
      Sim.schedule( new Arrival( Sim.now() + delay.next() ) ) ;
    }
  
  /**
   * @param name The name of the source node
   * @param d The {@link DistributionSampler} used to generate the
   *          inter-arrival times
   * @param b The {@link DistributionSampler} used to generate the
              batch sizes
  */
    public Source( String name, DistributionSampler d, DistributionSampler b ) {
      super( name ) ;
      delay = d ;
      batchsize = b ;
      Sim.schedule( new Arrival( Sim.now() + delay.next() ) ) ;
    }
  
     ....
  }
  </code></pre>
  
  <p>DistributionSampler is an AbstractClass.</p>
  
  <p>At the time of conversion from XML to Java Object, I will know which concrete implementation of my abstract class to use (via the bean name). </p>
  
  <p>However, I'm not entirely sure how to write the mapping file to tell castor how to do the translation.</p>
  
  <p>Any help would be much appreciated. </p>