Reflection API
1 posts in topic
Flat View  Flat View

Posted By:   Ramesh_Kumar
Posted On:   Monday, October 13, 2003 04:31 AM

What is the exact difference between calling a method by creating a new instance object and by using invoke() method.

Re: Reflection API

Posted By:   Stephen_McConnell  
Posted On:   Monday, October 13, 2003 12:49 PM

Using the "invoke()" method takes a lot more code and a lot more time.

While the reflection api's are very helpful, they are slower than directly calling the method through an instance of the object.

Reflection was meant to be used when you aren't exactly sure of what objects you have, what methods you have, and don't have an interface.... They were meant for discovery...

At least that is what I have used them for... Someone else may have another perspective on this.

Stephen Mcconnell

About | Sitemap | Contact