InvokeStaticMethod(Class, String, Object, Class). Method: public Method getDeclaredMethod(String name, Class<>.
Invokes a named static method whose parameter type matches the object type. 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).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |