problem faced while setting value using reflection
<p>i am using reflection to copy values of fields from object of Class A to object of Class B.
However method in A returns Number, where as setter in B requires Long. Is there any generic way i could set the value. As of now as expected i get illegalArgumentException: argument type mismatch</p>

<pre><code>class a
{
    Number value1;
    Number value2;
    public Number getValue1(){return value1;}
    public Number getValue2(){return value2;}

}

class b
{
    Double value1;
    Long   value2;
    public void setValue1(Double value){this.value1 = value;}
    public void setValue2(Long value){this.value2 = value;}

}
</code></pre>

<p>Not sure if my question is unclear.</p>
