How to create reflection class in java and is there any possible way to pass more than two class as argument -


i'm trying pass more 2 class in code given below

getmethod(methodname, new class[] { rootbean.getclass() }) 

and want create object argument class can call method of arugment class.

if(obj==null) {      classa.getmethod((methodname, new class[] { rootbean.getclass() })); } else {     // other operation } 

you

getmethod(methodname, new class[] { rootbean.getclass(), otherbean.class }); 

however class#getmethod takes variable length argument, no need create array, pass class agrument separated comma

getmethod(methodname, rootbean.getclass(), otherbean.class); 

Comments

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -