title: Use getDeclaredMethod using a function as a parameterType
body: <p>I have a private method which header is: </p>
  
  <pre><code>private fun setNumericListener(editText: EditText, onValueChanged:(newValue: Double?) -&gt; Unit)
  </code></pre>
  
  <p>I call this method in this way: <code>setNumericListener(amountEditText, this::onAmountChanged)</code></p>
  
  <p>I would like to use getDeclaredMethod from Class 
  <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Class.html#getDeclaredMethod(java.lang.String,%20java.lang.Class...)" rel="nofollow noreferrer">https://docs.oracle.com/javase/7/docs/api/java/lang/Class.html#getDeclaredMethod(java.lang.String,%20java.lang.Class...)</a> to get a reference to my private method <code>setNumericListener</code>. <code>getDeclaredMethod</code>receives an array of parameter types <code>Class&lt;?&gt;... parameterTypes</code> but I have no idea about how to set the parameter types array when my private method has a method reference as a parameter.</p>
  
  <p>Thanks</p>