this.extension = new JavaGeneratorExtensionFacade(extensionHandlers.toArray(new TJavaGeneratorExtension[0]));
}
private void write(Port port) {
JavaInterface intf = port.getJavaInterface();
String className = Names.customJavaTypeClassName(intf);
if (donotOverride && GeneratorUtil.classExists(options, className)) {
log("Class " + className + " exists. Not overriding.");
return;
}
JDefinedClass cls = null;
try {
cls = getClass(className, ClassType.INTERFACE);
} catch (JClassAlreadyExistsException e) {
QName portTypeName =
(QName) port.getProperty(
ModelProperties.PROPERTY_WSDL_PORT_TYPE_NAME);
Locator loc = null;
if(portTypeName != null){
PortType pt = port.portTypes.get(portTypeName);
if(pt!=null)
loc = pt.getLocator();
}
receiver.error(loc, GeneratorMessages.GENERATOR_SEI_CLASS_ALREADY_EXIST(intf.getName(), portTypeName));
return;
}
// If the class has methods it has already been defined
// so skip it.
if (!cls.methods().isEmpty())
return;
//write class comment - JAXWS warning
JDocComment comment = cls.javadoc();
String ptDoc = intf.getJavaDoc();
if(ptDoc != null){
comment.add(ptDoc);
comment.add("\n\n");
}