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