Revision 45357
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/DefaultInterpreter.java | ||
---|---|---|
335 | 335 |
if( args == null || args.size() != 1 ) { |
336 | 336 |
throw new ExpressionRuntimeException(code, I18N.Number_of_argument_mistmatch_in_operator_XIdentifierX_expected_1_got_XargcX(function.name(),args==null?0:args.size())); |
337 | 337 |
} |
338 |
value = ((UnaryOperator) function).call(this, runCode(args.get(0))); |
|
338 |
if( function.useArgumentsInsteadObjects() ) { |
|
339 |
value = function.call(this, args); |
|
340 |
} else { |
|
341 |
value = ((UnaryOperator) function).call(this, runCode(args.get(0))); |
|
342 |
} |
|
339 | 343 |
break; |
340 | 344 |
|
341 | 345 |
case Callable.BINARY_OPERATOR: |
342 | 346 |
if( args == null || args.size() != 2 ) { |
343 | 347 |
throw new ExpressionRuntimeException(code, I18N.Number_of_argument_mistmatch_in_operator_XIdentifierX_expected_2_got_XargcX(function.name(),args==null?0:args.size())); |
344 | 348 |
} |
345 |
value = ((BinaryOperator) function).call(this, runCode(args.get(0)), runCode(args.get(1))); |
|
349 |
if( function.useArgumentsInsteadObjects() ) { |
|
350 |
value = function.call(this, args); |
|
351 |
} else { |
|
352 |
value = ((BinaryOperator) function).call(this, runCode(args.get(0)), runCode(args.get(1))); |
|
353 |
} |
|
346 | 354 |
break; |
347 | 355 |
|
348 | 356 |
case Callable.FUNCTION: |
Also available in: Unified diff