public class MethodInvoker extends Object
| Constructor and Description |
|---|
MethodInvoker() |
MethodInvoker(TestCase testCase) |
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
getAvailableMethods(Object object) |
ArrayList<String> |
getAvalableMethods(Object component)
Returns a list of available method for the object provided.
|
Object |
invokeMethod(Object component,
String methodName)
Tries to invoke the method given upon the object given.
|
Object |
invokeMethod(Object component,
String methodName,
Object... args)
Tries to invoke the method given upon the object given.
|
static Object |
invokeMethod(TestCase testCase,
Object component,
String methodName,
Object... args)
Tries to invoke the method given upon the object given.
|
Object |
invokeTheFirstEncounteredMethod(Object component,
List<String> methodNames)
Tries to invoke the methods given upon the object given, in order of declaration.
|
Object |
invokeTheFirstEncounteredMethod(Object component,
List<String> methodNames,
Object... args)
Tries to invoke the methods given upon the object given, in order of declaration.
|
Object |
invokeTheFirstEncounteredMethod(Object component,
String[] methodNames)
Tries to invoke the methods given upon the object given, in order of declaration.
|
Object |
invokeTheFirstEncounteredMethod(Object component,
String[] methodNames,
Object... args)
Tries to invoke the methods given upon the object given, in order of declaration.
|
static Object |
invokeTheFirstEncounteredMethod(TestCase testCase,
Object component,
String[] methodNames)
Tries to invoke the methods given upon the object given, in order of declaration.
|
static Object |
invokeTheFirstEncounteredMethod(TestCase testCase,
Object component,
String[] methodNames,
Object... args)
Tries to invoke the methods given upon the object given, in order of declaration.
|
static Object |
invokeTheFirstEncounteredMethodFromListOfMethodNames(Object component,
String[] methodNames)
Tries to invoke the methods given upon the object given, in order of declaration.
|
static Object |
invokeTheFirstEncounteredMethodFromListOfMethodNames(Object component,
String[] methodNames,
Object... args)
Tries to invoke the methods given upon the object given, in order of declaration.
|
boolean |
objectHasAnyOfTheMethods(Object component,
String[] methodNames)
A check if the object seem to have any of the methods provided.
|
boolean |
objectHasMethod(Object component,
String methodName)
A check if the object seem to have the method provided.
|
public MethodInvoker(TestCase testCase)
public MethodInvoker()
public Object invokeTheFirstEncounteredMethod(Object component, List<String> methodNames)
component - The object to invoke the method on.methodNames - List of method names in order of invokation attempts.public static Object invokeTheFirstEncounteredMethod(TestCase testCase, Object component, String[] methodNames)
testCase - The test case to log to. If no test case is provided output is to console.component - The object to invoke the method on.methodNames - List of method names in order of invokation attempts.public static Object invokeTheFirstEncounteredMethod(TestCase testCase, Object component, String[] methodNames, Object... args)
testCase - The test case to log to. If no test case is provided output is to console.component - The object to invoke the method on.methodNames - List of method names in order of invokation attempts.args - Method arguments to use.public static Object invokeTheFirstEncounteredMethodFromListOfMethodNames(Object component, String[] methodNames)
component - The object to invoke the method on.methodNames - List of method names in order of invokation attempts.public Object invokeTheFirstEncounteredMethod(Object component, String[] methodNames)
component - The object to invoke the method on.methodNames - List of method names in order of invokation attempts.public Object invokeTheFirstEncounteredMethod(Object component, String[] methodNames, Object... args)
component - The object to invoke the method on.methodNames - List of method names in order of invokation attempts.args - Method arguments to use.public static Object invokeTheFirstEncounteredMethodFromListOfMethodNames(Object component, String[] methodNames, Object... args)
component - The object to invoke the method on.methodNames - List of method names in order of invokation attempts.args - Method arguments to use.public Object invokeTheFirstEncounteredMethod(Object component, List<String> methodNames, Object... args)
component - The object to invoke the method on.methodNames - List of method names in order of invokation attempts.args - Method arguments to use.public static Object invokeMethod(TestCase testCase, Object component, String methodName, Object... args)
testCase - The test case to log to. If no test case is provided output is to console.component - The object to invoke the method on.methodName - Method name for method to invoke.args - The arguments to pass to the method invoked.public Object invokeMethod(Object component, String methodName, Object... args)
component - The object to invoke the method on.methodName - Method name for method to invoke.args - Method arguments to use.public Object invokeMethod(Object component, String methodName)
component - The object to invoke the method on.methodName - Method name for method to invoke.public ArrayList<String> getAvalableMethods(Object component)
component - The object to list the available method for.public boolean objectHasMethod(Object component, String methodName)
component - Object.methodName - Method name.public boolean objectHasAnyOfTheMethods(Object component, String[] methodNames)
component - Object.methodNames - Method names.Copyright © 2019. All rights reserved.