title: IllegalArgumentException when calling invoke method using Java Reflections
body: <p>I have a class that has a method as follows :-</p>
  
  <pre><code>public void setCurrencyCode(List&lt;String&gt; newCurrencycode){
      this.currencycode = newCurrencycode;
  }
  </code></pre>
  
  <p>I am using Java Relections to invoke this method as follows :-</p>
  
  <pre><code>try {
      List&lt;String&gt; value = new ArrayList&lt;String&gt;();
      value.add("GB");
  
      Class&lt;?&gt; clazz = Class.forName( "com.xxx.Currency" );
      Object obj = clazz.newInstance();
      Class param[] = { List.class };
      Method method = obj.getClass().getDeclaredMethod( "setCurrencyCode", param );
      method.invoke( value );
  } catch(Exception e) {
      System.out.println( "Exception : " + e.getMessage() );
  }
  </code></pre>
  
  <p>However, an exception is raised on the "invoke" call :-
      java.lang.IllegalArgumentException: object is not an instance of declaring class</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks</p>
  
  <p>Sarah</p>