org.springframework.scripting

Interface ScriptEvaluator

    • Method Detail

      • evaluate

        @Nullable
        java.lang.Object evaluate(ScriptSource script,
                                            @Nullable
                                            java.util.Map<java.lang.String,java.lang.Object> arguments)
                                     throws ScriptCompilationException
        Evaluate the given script with the given arguments.
        Parameters:
        script - the ScriptSource for the script to evaluate
        arguments - the key-value pairs to expose to the script, typically as script variables (may be null or empty)
        Returns:
        the return value of the script, if any
        Throws:
        ScriptCompilationException - if the evaluator failed to read, compile or evaluate the script