return names;
}
private void marshalElementParticle(JavaMethod pMethod, Object pValue,
ParticleSG pParticle) throws SAXException {
ObjectSG oSG = pParticle.getObjectSG();
if (oSG.getTypeSG().isComplex()) {
Context cc = oSG.getTypeSG().getComplexTypeSG().getClassContext();
JavaQName serializerClass = cc.getXMLSerializerName();
LocalJavaField driver = pMethod.newJavaField(JMSAXDriver.class);
if (oSG.getTypeSG().isGlobalClass()) {
JavaQName elementInterface;
if (oSG.isGlobal()) {
elementInterface = oSG.getClassContext().getXMLInterfaceName();
} else {
elementInterface = cc.getXMLInterfaceName();
}
driver.addLine(getParamController(),
".getJMMarshaller().getJAXBContextImpl().getManagerS(",
elementInterface, ".class).getDriver()");
} else {
driver.addLine("new ", serializerClass, "();");
}
pMethod.addLine(getParamController(), ".marshal(", driver,
", ", JavaSource.getQuoted(oSG.getName().getNamespaceURI()),
", ", JavaSource.getQuoted(oSG.getName().getLocalName()),
", ", pValue, ");");
} else {
Object value = oSG.getTypeSG().getSimpleTypeSG().getCastToString(pMethod, pValue, getParamController());
pMethod.addLine(getParamController(), ".marshalSimpleChild(this, ",
JavaSource.getQuoted(oSG.getName().getNamespaceURI()), ", ",
JavaSource.getQuoted(oSG.getName().getLocalName()), ", ",
value, ");");
}
}