xmlRootElementBuilderGeneratorFactory function
Creates a BuilderGenerator from a ClassElement
that has an annotation of the form @XmlRootElement()
.
Implementation
BuilderGenerator xmlRootElementBuilderGeneratorFactory(ClassElement element) {
final xmlRootElement = element.getXmlRootElement()!.toXmlRootElementValue()!;
return XmlRootElementBuilderGenerator(
xmlRootElement.name ?? element.name,
namespace: xmlRootElement.namespace,
isSelfClosing: xmlRootElement.isSelfClosing,
isNullable: element.thisType.isNullable,
);
}