This week's giveaway is in the Threads forum.
We're giving away four copies of Java Concurrency Live Lessons and have Doug Schmidt on-line!
See this thread for details.
Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reflection and Interfaces  RSS feed

 
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!