Switch to full style
General Java code examples
Post a reply

General call (Invoke) to method

Tue Apr 23, 2013 9:42 pm

General call (Invoke to method ) Return Result of the invoked method
java code
public Object invokeMethod(Object ownerObject, Method method, Object... methodParameters) {

Object methodReturn = null;

try {
methodReturn = method.invoke(ownerObject, methodParameters);

} catch (IllegalArgumentException e) {
// Do something

} catch (IllegalAccessException e) {
// Do something

} catch (InvocationTargetException e) {
// Do something

}

return methodReturn;
}
}




Post a reply
  Related Posts  to : General call (Invoke) to method
 invoke class method dynamically in php     -  
 c++ general programming     -  
 draw General Path     -  
 General Error: Style data     -  
 Page Call MySelf PHP     -  
 how to call a global variable?     -  
 Make a call using java     -  
 Call PHP code from JSP Page     -  
 How i can transfer voice during call from phone to PC?     -  
 How i can transfer voice during call from phone to PC?     -  

Topic Tags

Java Methods