aspose file tools*
The moose likes Java in General and the fly likes how to invoke a method of a reflected field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to invoke a method of a reflected field" Watch "how to invoke a method of a reflected field" New topic
Author

how to invoke a method of a reflected field

Tudor Raneti
Ranch Hand

Joined: Nov 29, 2009
Posts: 145
SOLVED: I figured it out, the key was:


sumsNavigation is of type B that extends type A which has a protected LinkedList components; //field
It isn't possible to extend A directly from my class because of a special setup.
I need to do components.size() basically, but through reflection. I'm stuck at invoking the method, it won't accept any argument in m.invoke(sumsNavigation);.



 
jQuery in Action, 2nd edition
 
subject: how to invoke a method of a reflected field