• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reflection API - method invocation  RSS feed

 
Asif Kadiwala
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am using reflection API method.invoke(object); to call that method dynamically from anther class ABC. This works fine till I define all the parametes in that method itself, which are being used in the method.

The prolem arises when I am using some variables which are defined outside that method (but in the same calss ABC) , it gives nullpointerException at that variable. Is there any way to solve this issue.

Thanks in advance.
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't really get it. Can you post some code that explains it a bit better, including the NullPointerException stack trace?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!