Examples of evalScript()


Examples of org.apache.commons.scxml2.Evaluator.evalScript()

    @Override
    public void execute(ActionExecutionContext exctx) throws ModelException, SCXMLExpressionException {
        Context ctx = isGlobalScript() ? exctx.getGlobalContext() : exctx.getContext(getParentEnterableState());
        ctx.setLocal(getNamespacesKey(), getNamespaces());
        Evaluator eval = exctx.getEvaluator();
        eval.evalScript(ctx, getScript());
        ctx.setLocal(getNamespacesKey(), null);
    }

}
View Full Code Here

Examples of org.jruby.IRuby.evalScript()

        try {
            File f = new File(DATA + "snippets1.rb");
            runtime.loadFile(f, false);
            f = new File(DATA + "snippets2.rb");
            runtime.loadFile(f, false);
            IRubyObject rubyObject = runtime.evalScript("init");
            Assert.assertNotNull(rubyObject);
            rubyObject = runtime.evalScript("init");
            Assert.assertNotNull(rubyObject);
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

Examples of org.jruby.IRuby.evalScript()

            runtime.loadFile(f, false);
            f = new File(DATA + "snippets2.rb");
            runtime.loadFile(f, false);
            IRubyObject rubyObject = runtime.evalScript("init");
            Assert.assertNotNull(rubyObject);
            rubyObject = runtime.evalScript("init");
            Assert.assertNotNull(rubyObject);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of org.jruby.Ruby.evalScript()

        ruby.parse(scriptSource, "", null, 0));
    IRubyObject rubyObject = ruby.eval(scriptRootNode);

    if (rubyObject instanceof RubyNil) {
      String className = findClassName(scriptRootNode);
      rubyObject = ruby.evalScript("\n" + className + ".new");
    }
    // still null?
    if (rubyObject instanceof RubyNil) {
      throw new IllegalStateException("Compilation of JRuby script returned RubyNil: " + rubyObject);
    }
View Full Code Here

Examples of org.jruby.Ruby.evalScript()

        ruby.parse(scriptSource, "", null, 0));
    IRubyObject rubyObject = ruby.eval(scriptRootNode);

    if (rubyObject instanceof RubyNil) {
      String className = findClassName(scriptRootNode);
      rubyObject = ruby.evalScript("\n" + className + ".new");
    }
    // still null?
    if (rubyObject instanceof RubyNil) {
      throw new IllegalStateException("Compilation of JRuby script returned RubyNil: " + rubyObject);
    }
View Full Code Here

Examples of org.jruby.Ruby.evalScript()

        ruby.parse(scriptSource, "", null, 0));
    IRubyObject rubyObject = ruby.eval(scriptRootNode);

    if (rubyObject instanceof RubyNil) {
      String className = findClassName(scriptRootNode);
      rubyObject = ruby.evalScript("\n" + className + ".new");
    }
    // still null?
    if (rubyObject instanceof RubyNil) {
      throw new IllegalStateException("Compilation of JRuby script returned RubyNil: " + rubyObject);
    }
View Full Code Here

Examples of org.jruby.Ruby.evalScript()

        : ruby.parse(scriptSource, "", null));
    IRubyObject rubyObject = ruby.eval(scriptRootNode);

    if (rubyObject instanceof RubyNil) {
      String className = findClassName(scriptRootNode);
      rubyObject = ruby.evalScript("\n" + className + ".new");
    }
    // still null?
    if (rubyObject instanceof RubyNil) {
      throw new IllegalStateException("Compilation of JRuby script returned RubyNil: " + rubyObject);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.