jm.addLine("super.addAttribute(", pURI, ", ", pLocalName, ", ", pValue, ");");
return jm;
}
protected JavaMethod getXMLHandlersNewResultMethod(ComplexTypeSG pController, JavaSource pSource) {
JavaQName elementInterfaceClass = pController.getClassContext().getXMLInterfaceName();
JavaMethod jm = pSource.newJavaMethod("newResult", elementInterfaceClass, JavaSource.PROTECTED);
jm.addThrows(SAXException.class);
if (pController.getClassContext().isGlobal()) {
jm.addTry();
jm.addLine("return (", elementInterfaceClass, ") getData().getFactory().getElement(",
elementInterfaceClass, ".class);");
DirectAccessible e = jm.addCatch(JAXBException.class);
jm.addThrowNew(SAXException.class, e);
jm.addEndTry();
} else {
JavaQName elementImplClass = pController.getClassContext().getXMLImplementationName();
jm.addLine("return new ", elementImplClass, "();");
}
return jm;
}