Java: How to pass typed-array class as parameter?
<p>I have some 3rd-party API with method <code>someFn(int code, int[] data)</code>.</p>

<p>How can I express types (particulary array-typed argument) outside API container (interface class) for usage in <code>Class.getMethod(name, Integer.class, ???.class);</code>? How can I describe argument of array type properly?</p>

<p>As far as I know, I may use workaround like, but is there a better way of doing this?</p>

<pre class="lang-java prettyprint-override"><code>class C { void f(int[] a) {} } }

C.class.getDeclaredMethods()[0].getParameterTypes()[0]
</code></pre>

<p><sub>Thanks in advance</sub></p>
