public class MethodSupport extends Object
Constructor | Description |
---|---|
MethodSupport() |
Modifier and Type | Method | Description |
---|---|---|
static Object |
methodResultFor(Object instance,
String methodName) |
Returns result of given method invocation on provided object.
|
public static Object methodResultFor(Object instance, String methodName)
Following requirements have to be met to extract method results:
instance
- object on whichmethodName
- name of method to be invokedIllegalArgumentException
- if method does not exist or is not public, method returns void or method accepts
any argumentCopyright © 2014–2019. All rights reserved.