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