1 55 package org.jboss.axis.wsdl.toJava; 56 57 import org.jboss.axis.wsdl.symbolTable.TypeEntry; 58 59 import java.io.IOException ; 60 import java.io.PrintWriter ; 61 62 65 public class JavaHolderWriter extends JavaClassWriter 66 { 67 private TypeEntry type; 68 69 72 protected JavaHolderWriter(Emitter emitter, TypeEntry type) 73 { 74 super(emitter, Utils.holder(null, type, emitter), "holder"); 75 this.type = type; 76 } 78 81 protected String getClassModifiers() 82 { 83 return super.getClassModifiers() + "final "; 84 } 86 89 protected String getImplementsText() 90 { 91 return "implements javax.xml.rpc.holders.Holder "; 92 } 94 97 protected void writeFileBody(PrintWriter pw) throws IOException 98 { 99 String holderType = type.getName(); 100 pw.println(" public " + holderType + " value;"); 101 pw.println(); 102 pw.println(" public " + className + "() {"); 103 pw.println(" }"); 104 pw.println(); 105 pw.println(" public " + className + "(" + holderType + " value) {"); 106 pw.println(" this.value = value;"); 107 pw.println(" }"); 108 pw.println(); 109 } 111 } | Popular Tags |