1 19 20 package org.netbeans.modules.websvc.api.jaxws.wsdlmodel; 21 22 import com.sun.tools.ws.processor.model.java.JavaParameter; 23 24 28 public class WsdlParameter { 29 private JavaParameter parameter; 30 31 public WsdlParameter(JavaParameter parameter) { 32 this.parameter=parameter; 33 } 34 35 public Object getInternalJAXWSParameter() { 36 return parameter; 37 } 38 39 public String getName() { 40 return parameter.getName(); 41 } 42 43 public String getTypeName() { 44 String type = parameter.getType().getName(); 45 return isHolder()?"javax.xml.ws.Holder<"+wrapperType(type)+">":type; } 47 48 public boolean isHolder() { 49 return parameter.isHolder(); 50 } 51 52 public String getHolderName() { 53 return parameter.getHolderName(); 54 } 55 56 private String wrapperType(String type) { 57 if ("int".equals(type)) return "Integer"; else if ("float".equals(type)) return "Float"; else if ("double".equals(type)) return "Double"; else if ("byte".equals(type)) return "Byte"; else if ("long".equals(type)) return "Long"; else if ("boolean".equals(type)) return "Boolean"; else if ("char".equals(type)) return "Character"; else return type; 65 } 66 } 67 | Popular Tags |