KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis2 > wsdl > codegen > writer > InterfaceImplementationWriter


1 package org.apache.axis2.wsdl.codegen.writer;
2
3 import org.apache.axis2.wsdl.codegen.XSLTConstants;
4
5 import java.io.File JavaDoc;
6
7 /*
8  * Copyright 2004,2005 The Apache Software Foundation.
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  *
23  */

24 public class InterfaceImplementationWriter extends ClassWriter {
25     public InterfaceImplementationWriter(String JavaDoc outputFileLocation) {
26             this.outputFileLocation = new File JavaDoc(outputFileLocation);
27         }
28
29         public InterfaceImplementationWriter(File JavaDoc outputFileLocation,int language) {
30             this.outputFileLocation = outputFileLocation;
31             this.language = language;
32         }
33
34         /**
35          * @see org.apache.axis2.wsdl.codegen.writer.ClassWriter#loadTemplate()
36          */

37          public void loadTemplate(){
38             Class JavaDoc 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 JavaDoc();
50             }
51
52         }
53
54
55 }
56
Popular Tags