Code example for SimpleBindings

0
     
    } 
     
    @Override 
    public Bindings createBindings() {
        return new SimpleBindings();
    } 
     
    @Override 
    public Object eval(String script, ScriptContext context) throws ScriptException {
        if (script == null) {
            throw new NullPointerException("Null script");
        } 
        return eval(new StringReader(script) , context);
    } 
     
    @Override 
    public Object eval(Reader reader, ScriptContext context) throws ScriptException {
        String filename = (String) get(ScriptEngine.FILENAME);
        if (filename == null) {