code: public static void throwArgMismatchException( IllegalArgumentException exceptionToWrap, String featureName, Class[] actualParameters, Object[] args )
    {
      String argTypes = "(";
      for( int i = 0; i < actualParameters.length; i++ )
      {
        Class aClass = actualParameters[i];
        if( i > 0 )
        {
          argTypes += " ,";
        }
        argTypes += aClass.getName();
      }
      argTypes += ")";
  
      String rttTypes = "(";
      for( int i = 0; i < args.length; i++ )
      {
        if( i > 0 )
        {
          rttTypes += " ,";
        }
        if( args[i] != null )
        {
          rttTypes += args[i].getClass().getName();
        }
        else
        {
          rttTypes += "null";
        }
      }
      rttTypes += ")";
  
      throw new RuntimeException( "Tried to pass values of types: " + rttTypes + " into " + featureName + " that takes types " + argTypes, exceptionToWrap );
    }
docs: This method can be used to provide a more informative type-mismatch exception message than the standard java reflection
  does with its IllegalArgumentException.
  
  @param exceptionToWrap  - exception to wrap
  @param featureName      - feature being executed when the (e.g. "method" or "constructor")
  @param actualParameters - the actual parameter types expected
  @param args             - the args passed to the feature