• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reflection and Interfaces

 
Eddie Long
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to use refelection to call a method that takes an interface?
I tried and it seems it's not possible as i get a nosuchmethodexception
Given

it can be called by doing


The text in bold doesn't seem right because calling getClass() on an interface seems plainly wrong...any ideas?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!