static int countParametersFromSignature(String signature)
   {
      if (signature.charAt(0) != '(')
      {
         throw new IllegalStateException("Invalid signature: " + signature);
      }
      int count = 0;
      for (int i = 1; i < signature.length(); i++)
      {
         if (signature.charAt(i) == ')')
         {
            return count;
         }
         count++;
         switch (signature.charAt(i))
         {
            case 'L':
               while (signature.charAt(i) != ';')
               {
                  i++;
               }
            break;
            case '[':
               while (signature.charAt(i) == '[')
               {
                  i++;
               }
               if (signature.charAt(i) == 'L')
               {
                  while (signature.charAt(i) != ';')
                  {
                     i++;
                  }
               }
            break;
         }

      }
      throw new IllegalStateException("Signature not end with ): " + signature);
   }