catch (InvocationTargetException ite) { Throwable resultException = ite; Throwable targetException = ite.getTargetException();  if (targetException instanceof TransformerException) throw ((TransformerException)targetException); else if (targetException != null) resultException = targetException;  throw new TransformerException(resultException); }
  public void processElement (String localPart,                              ElemTemplateElement element,                              TransformerImpl transformer,                              Stylesheet stylesheetTree,                              Object methodKey)    throws TransformerException, IOException  {    Object result = null;    Class classObj;    Method m = (Method) getFromCache(methodKey, null, null);    if (null == m)    {      try      {        String fullName = m_className + localPart;        int lastDot = fullName.lastIndexOf(".");        if (lastDot < 0)          throw new TransformerException(XSLMessages.createMessage(XSLTErrorResources.ER_INVALID_ELEMENT_NAME, new Object[]{fullName })); //"Invalid element name specified " + fullName);        try        {          classObj = getClassForName(fullName.substring(0, lastDot));        }        catch (ClassNotFoundException e)         {          throw new TransformerException(e);        }        localPart = fullName.substring(lastDot + 1);        m = MethodResolver.getElementMethod(classObj, localPart);        if (!Modifier.isStatic(m.getModifiers()))          throw new TransformerException(XSLMessages.createMessage(XSLTErrorResources.ER_ELEMENT_NAME_METHOD_STATIC, new Object[]{fullName })); //"Element name method must be static " + fullName);      }      catch (Exception e)      {        // e.printStackTrace ();        throw new TransformerException (e);      }      putToCache(methodKey, null, null, m);    }    XSLProcessorContext xpc = new XSLProcessorContext(transformer,                                                       stylesheetTree);    try    {      result = m.invoke(null, new Object[] {xpc, element});    }    catch (Exception e)    {      // e.printStackTrace ();      throw new TransformerException (e);    }    if (result != null)    {      xpc.outputToResultTree (stylesheetTree, result);    }   }