1 package org.apache.axis2.wsdl.codegen.writer; 2 3 import org.apache.axis2.wsdl.codegen.XSLTConstants; 4 5 import java.io.File ; 6 7 24 public class TestClassWriter extends ClassWriter{ 25 26 public TestClassWriter(String outputFileLocation) { 27 this.outputFileLocation = new File (outputFileLocation); 28 } 29 30 public TestClassWriter(File outputFileLocation,int language) { 31 this.outputFileLocation = outputFileLocation; 32 this.language = language; 33 } 34 35 public void loadTemplate() { 36 Class clazz = this.getClass(); 37 switch (language){ 38 case XSLTConstants.LanguageTypes.JAVA: 39 this.xsltStream = clazz.getResourceAsStream(XSLTConstants.XSLTTestClassTemplates.JAVA_TEMPLATE); 40 break; 41 case XSLTConstants.LanguageTypes.C_SHARP: 42 this.xsltStream = clazz.getResourceAsStream(XSLTConstants.XSLTTestClassTemplates.CSHARP_TEMPLATE); 43 break; 44 case XSLTConstants.LanguageTypes.C_PLUS_PLUS: 45 case XSLTConstants.LanguageTypes.VB_DOT_NET: 46 default: 47 throw new UnsupportedOperationException (); 48 } 49 } 50 } 51 | Popular Tags |