toXmlAttributeValue method

XmlAttribute? toXmlAttributeValue()

Returns an XmlAttribute corresponding to the value of the object being represented or null if this object is not of type XmlAttribute.

Implementation

XmlAttribute? toXmlAttributeValue() {
  if (type?.isXmlAnnotationXmlAttribute == true) {
    return XmlAttribute(
      name: getField('name')?.toStringValue(),
      namespace: getField('namespace')?.toStringValue(),
    );
  }

  return null;
}