in src/main/java/org/apache/commons/jxpath/ri/compiler/CoreFunction.java [89:129]
public boolean computeContextDependent() {
if (super.computeContextDependent()) {
return true;
}
switch (functionCode) {
case Compiler.FUNCTION_LAST:
case Compiler.FUNCTION_POSITION:
return true;
case Compiler.FUNCTION_BOOLEAN:
case Compiler.FUNCTION_LOCAL_NAME:
case Compiler.FUNCTION_NAME:
case Compiler.FUNCTION_NAMESPACE_URI:
case Compiler.FUNCTION_STRING:
case Compiler.FUNCTION_LANG:
case Compiler.FUNCTION_NUMBER:
return args == null || args.length == 0;
case Compiler.FUNCTION_FORMAT_NUMBER:
return args != null && args.length == 2;
case Compiler.FUNCTION_COUNT:
case Compiler.FUNCTION_ID:
case Compiler.FUNCTION_CONCAT:
case Compiler.FUNCTION_STARTS_WITH:
case Compiler.FUNCTION_ENDS_WITH:
case Compiler.FUNCTION_CONTAINS:
case Compiler.FUNCTION_SUBSTRING_BEFORE:
case Compiler.FUNCTION_SUBSTRING_AFTER:
case Compiler.FUNCTION_SUBSTRING:
case Compiler.FUNCTION_STRING_LENGTH:
case Compiler.FUNCTION_NORMALIZE_SPACE:
case Compiler.FUNCTION_TRANSLATE:
case Compiler.FUNCTION_NOT:
case Compiler.FUNCTION_TRUE:
case Compiler.FUNCTION_FALSE:
case Compiler.FUNCTION_SUM:
case Compiler.FUNCTION_FLOOR:
case Compiler.FUNCTION_CEILING:
case Compiler.FUNCTION_ROUND:
default:
return false;
}
}