code: protected static IJavaClassConstructor findConstructor( IJavaClassInfo cls, int numArgs ) {
      IJavaClassConstructor match = null;
      for (IJavaClassConstructor cons : cls.getDeclaredConstructors()) {
        if (cons.getParameterTypes().length == numArgs) {
          if (match != null) {
            throw new IllegalArgumentException("The call to create a new " + cls + " with " + numArgs + " arguments is ambiguous");
          } else {
            match = cons;
          }
        }
      }
  
      if (match == null) {
        throw new IllegalArgumentException("No constructor with " + numArgs + " arguments found on class " + cls);
      }
  
      return match;
    }
docs: ------------------------ Constructor Resolution