xmlAttributeConstructorGeneratorFactory function
Creates a ConstructorGenerator from a FieldElement
that has an attribute of the form @XmlAttribute()
.
Implementation
ConstructorGenerator xmlAttributeConstructorGeneratorFactory(
FieldElement element,
) {
final xmlAttribute = element.getXmlAttribute()!.toXmlAttributeValue()!;
return XmlAttributeConstructorGenerator(
xmlAttribute.name ?? element.getEncodedFieldName(),
namespace: xmlAttribute.namespace,
isNullable: element.type.isNullable,
);
}