- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Re: invoke method with an array using reflection
Thu, 2009-03-12, 16:17
>>>>> "Giovanni" == Giovanni De Facci writes:
Giovanni> Both mthd.invoke fail with the exception:
Giovanni> java.lang.IllegalArgumentException: object is not an instance
Giovanni> of declaring class
Giovanni> Is it the expected behaviour?
Yes. You need to tell the invoke method what object you want to invoke
it on: methd.invoke(pa,...)