code: @SuppressWarnings("unchecked")
      public static void addExtensionProvider(String elementName, String namespace,
              Object provider) {
          validate(elementName, namespace);
          // First remove existing providers
          String key = removeExtensionProvider(elementName, namespace);
          if (provider instanceof ExtensionElementProvider) {
              extensionProviders.put(key, (ExtensionElementProvider<ExtensionElement>) provider);
          } else {
              throw new IllegalArgumentException("Provider must be a PacketExtensionProvider");
          }
      }
docs: Adds an extension provider with the specified element name and name space. The provider
  will override any providers loaded through the classpath. The provider must be either
  a PacketExtensionProvider instance, or a Class object of a Javabean.
  
  @param elementName the XML element name.
  @param namespace the XML namespace.
  @param provider the extension provider.