JavaMethod jm = pSource.newJavaMethod("getAttributes", AttributesImpl.class, "protected");
DirectAccessible pData = jm.addParam(JavaQNameImpl.getInstance(JMXmlSerializer.Data.class), "pData");
DirectAccessible pElement = jm.addParam(Object.class, "pElement");
jm.addThrows(SAXException.class);
LocalJavaField result = jm.newJavaField(AttributesImpl.class);
result.addLine("super.getAttributes(", pData, ", ", pElement, ")");
JavaQName elementInterface = pController.getClassContext().getXMLInterfaceName();
LocalJavaField element = jm.newJavaField(elementInterface);
element.addLine("(", elementInterface, ") ", pElement);
AttributeSG[] myAttributes = pController.getAttributes();
XMLSerializerAttributeSGlet sgLet = new XMLSerializerAttributeSGlet(result, pData);
for (int i = 0; i < attributes.length; i++) {
AttributeSG attribute = myAttributes[i];
if (attribute.isWildcard()) {
LocalJavaField anyAttributes = jm.newJavaField(WildcardAttribute[].class);
anyAttributes.addLine(element, ".", attribute.getPropertySG().getXMLGetMethodName() + "Array", "()");
DirectAccessible index = jm.addForArray(anyAttributes);
LocalJavaField wildcardAttribute = jm.newJavaField(WildcardAttribute.class);
wildcardAttribute.addLine(anyAttributes, "[", index, "]");
LocalJavaField qName = jm.newJavaField(QName.class);
qName.addLine(wildcardAttribute, ".getName()");
LocalJavaField uri = jm.newJavaField(String.class);
uri.addLine(qName, ".getNamespaceURI()");
LocalJavaField localPart = jm.newJavaField(String.class);
localPart.addLine(qName, ".getLocalPart()");
jm.addLine(result, ".addAttribute(", uri, ", ", localPart,
", getAttributeQName(pData, ", uri, ", ", localPart,
"), \"CDATA\", ", wildcardAttribute, ".getValue());");
jm.addEndFor();
} else {