java - Problem with Method.invoke -


i have method return list of objects , want call invoke method of class method. problem invoke method returns object , not list<object>.

the code here:

class<? extends anobject> anobject = myobject.getclass(); method mymethod = myobject.getmethod("getlistobject");  object objject = method.invoke(myobject); // want return list 

how can solve it?

class<? extends anobject>  anobject = myobject.getclass(); method mymethod = myobject.getmethod("getlistobject");  list object = (list)mymethod.invoke(anobject); 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -