interceptor concept introduced: entity adapter fields referenced in a
[mir.git] / source / mir / generator / TALGenerator.java
index 2dc91af..12bb488 100755 (executable)
@@ -39,10 +39,12 @@ import mir.log.LoggerWrapper;
 public class TALGenerator implements Generator {
   private String templateIdentifier;
   private TALGeneratorLibrary library;
+  private Interceptor interceptor;
 
-  public TALGenerator(String aTemplate, TALGeneratorLibrary aLibrary) {
+  public TALGenerator(String aTemplate, TALGeneratorLibrary aLibrary, Interceptor anInterceptor) {
     templateIdentifier = aTemplate;
     library = aLibrary;
+    interceptor = anInterceptor;
   }
 
   public void generate(Object anOutputWriter, Map aValues, final LoggerWrapper aLogger) throws GeneratorExc, GeneratorFailure {
@@ -93,8 +95,8 @@ public class TALGenerator implements Generator {
       engine = new TALTemplateEngine(new MirExpressionParser(), aTemplateRoot);
     }
 
-    public Generator makeGenerator(String anIdentifier) throws GeneratorExc, GeneratorFailure {
-      return new TALGenerator(anIdentifier, this);
+    public Generator makeGenerator(String anIdentifier, Interceptor anInterceptor) throws GeneratorExc, GeneratorFailure {
+      return new TALGenerator(anIdentifier, this, anInterceptor);
     }
   }