Parameters: object - invoke method on this object forceAccess - force access to invoke method even if it's not accessible methodName - get method with this name args - use these arguments - treat null as empty array parameterTypes - match these parameters - treat null as empty array Returns: The value returned by the invoked method Throws: NoSuchMethodException - if there is no such accessible method InvocationTargetException - wraps an exception thrown by the method invoked IllegalAccessException - if the requested method is not accessible via reflection Since: 3.5 Parameters: object - invoke method on this object forceAccess - force access to invoke method even if it's not accessible methodName - get method with this name args - use these arguments - treat null as empty array Returns: The value returned by the invoked method Throws: NoSuchMethodException - if there is no such accessible method InvocationTargetException - wraps an exception thrown by the method invoked IllegalAccessException - if the requested method is not accessible via reflection Since: 3.5 InvokeMethod(Object object, boolean forceAccess, String methodName, Object args, Class parameterTypes). invokeMethod public static Object invokeMethod​( Object object,.Parameters: object - invoke method on this object methodName - get method with this name args - use these arguments - treat null as empty array Returns: The value returned by the invoked method Throws: NoSuchMethodException - if there is no such accessible method InvocationTargetException - wraps an exception thrown by the method invoked IllegalAccessException - if the requested method is not accessible via reflection InvokeMethod(Object object, String methodName, Object args, Class parameterTypes). This method supports calls to methods taking primitive parameters This method delegates the method search to getMatchingAccessibleMethod(Class, String, Class). Invokes a named method whose parameter type matches the object type.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |