@Override public MethodExecutionResult execute(String instanceName, String methodName, Object[] args) throws Throwable { List<Library> libraries = context.getLibraries(); for (int i = (libraries.size() - 1); i >= 0; i--) { MethodExecutionResult result = findAndInvoke(methodName, args, libraries.get(i).instance); if (result.hasResult()) { return result; } } return MethodExecutionResult.NO_METHOD_IN_LIBRARIES; } }
@Override public MethodExecutionResult execute(String instanceName, String methodName, Object[] args) throws Throwable { List<Library> libraries = context.getLibraries(); for (int i = (libraries.size() - 1); i >= 0; i--) { MethodExecutionResult result = findAndInvoke(methodName, args, libraries.get(i).instance); if (result.hasResult()) { return result; } } return MethodExecutionResult.NO_METHOD_IN_LIBRARIES; } }
private MethodExecutionResult findSystemUnderTest(String methodName, Object instance, Class<?> k, Object[] args) throws Throwable{ Field[] fields = k.getDeclaredFields(); for (Field field : fields) { if (isSystemUnderTest(field)) { Object systemUnderTest = field.get(instance); MethodExecutionResult res = findAndInvoke(methodName, args, systemUnderTest); if (res.hasResult()) { return res; } } } return MethodExecutionResult.noMethod(methodName, instance.getClass(), args.length); }
private MethodExecutionResult findSystemUnderTest(String methodName, Object instance, Class<?> k, Object[] args) throws Throwable{ Field[] fields = k.getDeclaredFields(); for (Field field : fields) { if (isSystemUnderTest(field)) { Object systemUnderTest = field.get(instance); MethodExecutionResult res = findAndInvoke(methodName, args, systemUnderTest); if (res.hasResult()) { return res; } } } return MethodExecutionResult.noMethod(methodName, instance.getClass(), args.length); }
private MethodExecutionResult getMethodExecutionResult(String instanceName, String methodName, Object... args) throws Throwable { MethodExecutionResults results = new MethodExecutionResults(); Boolean ignoreSymbols = ignoreSymbols( instanceName, methodName); if (!ignoreSymbols){ args = context.replaceSymbols(args); } for (MethodExecutor anExecutorChain : executorChain) { MethodExecutionResult result = anExecutorChain.execute(instanceName, methodName, args); if (result.hasResult()) { return result; } results.add(result); } return results.getFirstResult(); }
private MethodExecutionResult getMethodExecutionResult(String instanceName, String methodName, Object... args) throws Throwable { MethodExecutionResults results = new MethodExecutionResults(); Boolean ignoreSymbols = ignoreSymbols( instanceName, methodName); if (!ignoreSymbols){ args = context.replaceSymbols(args); } for (MethodExecutor anExecutorChain : executorChain) { MethodExecutionResult result = anExecutorChain.execute(instanceName, methodName, args); if (result.hasResult()) { return result; } results.add(result); } return results.getFirstResult(); }