merge of localization branch into HEAD. mh and zap
[mir.git] / source / mircoders / producer / OldProducerAdapter.java
1 package mircoders.producer;
2
3 import mir.producer.*;
4 import java.io.*;
5
6 public class OldProducerAdapter implements mir.producer.Producer {
7
8   private mircoders.producer.Producer oldProducer;
9   private Boolean forced;
10
11   public OldProducerAdapter( mircoders.producer.Producer anOldProducer, Boolean aForced ) {
12     oldProducer = anOldProducer;
13     forced = aForced;
14   }
15
16   public void produce( PrintWriter aLogger ) throws ProducerFailure {
17     try {
18       oldProducer.handle( aLogger, null, forced.booleanValue(), false );
19     }
20     catch (Throwable e) {
21       throw new ProducerFailure("Failure at handling old Producers",e);
22     }
23   }
24 }