xmlAttributeBuilderGeneratorFactory function

BuilderGenerator xmlAttributeBuilderGeneratorFactory(
  1. FieldElement element
)

Creates a BuilderGenerator from a FieldElement that has an annotation of the form @XmlAttribute().

Implementation

BuilderGenerator xmlAttributeBuilderGeneratorFactory(FieldElement element) {
  final xmlAttribute = element.getXmlAttribute()!.toXmlAttributeValue()!;

  return XmlAttributeBuilderGenerator(
    xmlAttribute.name ?? element.getEncodedFieldName(),
    namespace: xmlAttribute.namespace,
    isNullable: element.type.isNullable,
  );
}