in java how to avoid multiple if else with map for isAssignableFrom
<p>I would like to avoid the if else, in java this:</p>

<pre><code> for (Class clazz : method.getParameterTypes()) {
  if (SomeClass.class.isAssignableFrom(clazz)) {
      arguments[i] = onearg;
    } else if (SomeOtherClass.class.isAssignableFrom(clazz)) {
      arguments[i] = someotherarg;
    }
 }
</code></pre>

<p>can anyone suggest how to do this? thanks</p>
