code: public boolean hasExtension(String elementName, String namespace) {
          if (elementName == null) {
              return hasExtension(namespace);
          }
          String key = XmppStringUtils.generateKey(elementName, namespace);
          synchronized (packetExtensions) {
              return packetExtensions.containsKey(key);
          }
      }
docs: Check if a stanza extension with the given element and namespace exists.
  <p>
  The argument <code>elementName</code> may be null.
  </p>
  
  @param elementName
  @param namespace
  @return true if a stanza extension exists, false otherwise.