• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to invoke method with parameter using urlclassloader?  RSS feed

 
Jhovarie Guiang
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello guys dont know how to invoke ActionMethod2





my problem is that i dont know how to invoke ActionMethod2 please help it has parameter.
 
Gaurangkumar Khalasi
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jhovarie Guiang wrote:
my problem is that i dont know how to invoke ActionMethod2 please help it has parameter.

Use following method of the class Method:-
public Method getMethod(String name,Class[] parameterTypes)
Returns a Method object that reflects the specified public member method of the class or interface represented by this Class object. The name parameter is a String specifying the simple name the desired method. The parameterTypes parameter is an array of Class objects that identify the method's formal parameter types, in declared order. If parameterTypes is null, it is treated as if it were an empty array.
 
Jhovarie Guiang
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gaurangkumar Khalasi wrote:
Jhovarie Guiang wrote:
my problem is that i dont know how to invoke ActionMethod2 please help it has parameter.

Use following method of the class Method:-
public Method getMethod(String name,Class[] parameterTypes)
Returns a Method object that reflects the specified public member method of the class or interface represented by this Class object. The name parameter is a String specifying the simple name the desired method. The parameterTypes parameter is an array of Class objects that identify the method's formal parameter types, in declared order. If parameterTypes is null, it is treated as if it were an empty array.


Hello how to invoke this method?



 
Gaurangkumar Khalasi
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jhovarie Guiang wrote:Hello how to invoke this method?


Try out the following:

 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!