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 LocalTestClassWriter extends ClassWriter{ 25 26 public LocalTestClassWriter(String outputFileLocation) { 27 this.outputFileLocation = new File (outputFileLocation); 28 } 29 30 public LocalTestClassWriter(File outputFileLocation,int language) { 31 this.outputFileLocation = outputFileLocation; 32 this.language = language; 33 } 34 public void loadTemplate() { 35 Class clazz = this.getClass(); 36 switch (language){ 37 case XSLTConstants.LanguageTypes.JAVA: 38 this.xsltStream = clazz.getResourceAsStream(XSLTConstants.XSLTLocalTestClassTemplates.JAVA_TEMPLATE); 39 break; 40 case XSLTConstants.LanguageTypes.C_SHARP: 41 this.xsltStream = clazz.getResourceAsStream(XSLTConstants.XSLTLocalTestClassTemplates.CSHARP_TEMPLATE); 42 break; 43 case XSLTConstants.LanguageTypes.C_PLUS_PLUS: 44 case XSLTConstants.LanguageTypes.VB_DOT_NET: 45 default: 46 throw new UnsupportedOperationException (); 47 } 48 } 49 } 50 | Popular Tags |