public class JavaTestScriptMethodMapper extends NumericEvaluator
Mapper of scripting language commands onto calls of Java methods provided by the DefaultJavaTestScript class. It is used by the Java converter.
Note that conversion is not based on Java Reflection API because Java doesn't save method argument names to the byte code. Any use of reflection would also limit flexibility of how tests can be written. The method parameters are rather annotated and the code is compiled to save annotations to the bytecode.
T-Plan Robot Enterprise, (C) 2009-2022 T-Plan Limited. All rights reserved.
BOOLEAN_OPERATORS, NUMERIC_OPERATORS, OPERATOR_AND, OPERATOR_CONTAINS, OPERATOR_DIVIDE, OPERATOR_ENDSWITH, OPERATOR_EQUALS, OPERATOR_EQUALS_NOT, OPERATOR_EXISTS, OPERATOR_GREATER_THAN, OPERATOR_LEFT_PARENTHESIS, OPERATOR_LOWER_THAN, OPERATOR_MATCHES, OPERATOR_MINUS, OPERATOR_MODULO, OPERATOR_MULTIPLY, OPERATOR_OR, OPERATOR_PLUS, OPERATOR_RIGHT_PARENTHESIS, OPERATOR_STARTSWITH, UNARY_OPERATORS
Constructor and Description |
---|
JavaTestScriptMethodMapper(ConversionEvaluator gen,
TokenParser parser) |
Modifier and Type | Method and Description |
---|---|
void |
addClassName(Class cl,
TokenParser parser) |
String |
convert(List args,
Map values,
ScriptingContext ctx,
Map<Class,String> exceptionMap,
Map<String,String> importMap) |
boolean |
supports(String command) |
evaluateNumericExpression, evaluateNumericExpression, fixForCondition, fixIfCondition, getBinaryOperators, isLegacy, isOperator, main, parseExpression, test
public JavaTestScriptMethodMapper(ConversionEvaluator gen, TokenParser parser)