public static void addAttribute(final AttributesImpl attributes, final String prefix,
      final String localName, final Object value) {
    if (null != value) {
      attributes.addAttribute(XMLConstants.NULL_NS_URI, localName, prefix + ":" + localName, "",
          value.toString());
    }
  }
Adds attribute with <code>prefix</code> and <code>localName</code> to <code>attributes</code>
if value is not null. Follows the same rules as
{@link AttributesImpl#addAttribute(String, String, String, String, String)} .

@param attributes to add to.
@param prefix of the attribute.
@param localName of attribute to add.
@param value to add to attribute.
@since GemFire 8.1
geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/XmlGeneratorUtils.java