1 22 package org.enhydra.kelp.common.bridge; 23 24 import org.enhydra.xml.xmlc.XMLCException; 26 import org.enhydra.xml.xmlc.compiler.ClassGenerator; 27 import org.enhydra.xml.xmlc.dom.XMLCDocument; 28 import org.enhydra.xml.xmlc.metadata.MetaData; 29 30 import java.io.PrintWriter ; 32 import java.io.IOException ; 33 public class GeneratorV2 implements Generator { 34 private ClassGenerator codeGen = null; 35 36 public GeneratorV2(MetaDataHandler handler, XMLCDocument xmlcDoc, 37 PrintWriter verboseOutput) throws XMLCException { 38 MetaData metaData = null; 39 40 metaData = (MetaData) handler.getMetaData(); 41 codeGen = new ClassGenerator(metaData, xmlcDoc, verboseOutput); 42 } 43 44 public void generateJavaSource(PrintWriter writer) throws XMLCException { 45 try { 46 codeGen.generateJavaSource(writer); 47 } catch (IOException e) { 48 e.printStackTrace(); 49 XMLCException xe = new XMLCException(e); 50 } 51 } 52 53 } 54 | Popular Tags |