i changed the exception-handling of the new producers and localizers to use the multe...
[mir.git] / source / mircoders / producer / StaticProducerFactory.java
1 package mircoders.producer;
2
3 import java.util.*;
4 import mir.producer.*;
5
6 public class StaticProducerFactory implements ProducerFactory {
7   private String generatorIdentifier;
8   private String resourceBundle;
9   private String outputFile;
10
11   public StaticProducerFactory(
12     String aGeneratorIdentifier,
13     String aResourceBundle,
14     String anOutputFile) {
15
16     generatorIdentifier = aGeneratorIdentifier;
17     resourceBundle = aResourceBundle;
18     outputFile = anOutputFile;
19   }
20
21
22   public mir.producer.Producer makeProducer(String aVerb) throws ProducerFailure {
23     try {
24       return new StaticProducer( generatorIdentifier, resourceBundle, outputFile );
25     }
26     catch (Throwable e) {
27       throw new ProducerFailure("Creating StaticProducer failed",e);
28     }
29   };
30
31   public Iterator verbs() {
32     Vector verbList = new Vector();
33
34     verbList.add("all");
35
36     return verbList.iterator();
37   };
38 }
39