code: private static <T> Extension<T> parseBinderExtensionElement(Element element) {
  
          @SuppressWarnings("unchecked")
  		Class<T> providerClass = (Class<T>)lookupClass(element.getAttribute("class"));
          
          Class<?> implementationClass = lookupClass(element.getAttribute("implementationClass"));
  
          if (providerClass == null) {
              throw new IllegalStateException("Referenced class {" + element.getAttribute("class")
                      + "} could not be found");
          }
          if (implementationClass == null) {
              throw new IllegalStateException("Referenced implementation class {" + element.getAttribute("implementationClass")
                      + "} could not be found");
          }
          if (providerClass.isAssignableFrom(implementationClass)) {
              throw new IllegalStateException("Referenced class {" + element.getAttribute("class")
                      + "} did not implement BindingProvider");
          }
  
  		try {
  			@SuppressWarnings("unchecked")
  			final Class<? extends T> myImplementationClass = (Class<T>) implementationClass.newInstance();
  			return new Extension<T>(providerClass, myImplementationClass);
  		} catch (InstantiationException e) {
              throw new IllegalStateException("Referenced implementation class {" + element.getAttribute("implementationClass")
                      + "} could not be instantiated");
  		} catch (IllegalAccessException e) {
              throw new IllegalStateException("Referenced implementation class {" + element.getAttribute("implementationClass")
                      + "} could not be accessed");
  		}
      }
docs: Parse the 'extension' element
  @param element The element
  @return A {@link Extension} instance for the element