Hi Guys,
I am actually looking at getting the method, whose name is stored in the string "methodName", from the Class "CC1" using Java Reflection.
Method actualMethod= CC1.getMethod(methodName, parameterTypes);
This is the syntax. The problem is the method takes no parameter. How do I represent that in the parameterTypes ?
where parameterTypes is the array of Class
Similarly, the below code will invoke that method.
Object retobj = actaulMethod.invoke(actualObject, arglist);
The arglist is array of Objects which again has to be nothing.
If anything is unclear , please ask. Thanks .