public BSFExample(BSFManager manager) { this.manager = manager; /* * Initialize a simple Frame. */ initUI(); }
public void handleException(BSFException bsfExcptn) { printException(runtime, (Exception) bsfExcptn.getTargetException()); }
public static void main(String[] args) { /* * First we need to register the JRuby engine. */ BSFManager.registerScriptingEngine("ruby", "org.jruby.javasupport.bsf.JRubyEngine", new String[] { "rb" }); /* * Now we create a new BSFManager. */ new BSFExample(new BSFManager()); }
@Override public void initialize(BSFManager manager, String language, Vector someDeclaredBeans) throws BSFException { super.initialize(manager, language, someDeclaredBeans); runtime = JavaEmbedUtils.initialize(getClassPath(manager)); for (int i = 0, size = someDeclaredBeans.size(); i < size; i++) { BSFDeclaredBean bean = (BSFDeclaredBean) someDeclaredBeans.elementAt(i); runtime.getGlobalVariables().define( GlobalVariable.variableName(bean.name), new BeanGlobalVariable(runtime, bean), org.jruby.internal.runtime.GlobalVariable.Scope.GLOBAL); } runtime.getGlobalVariables().defineReadonly("$bsf", new FunctionsGlobalVariable(runtime, new BSFFunctions(manager, this)), org.jruby.internal.runtime.GlobalVariable.Scope.GLOBAL); }
@Override public void declareBean(BSFDeclaredBean bean) throws BSFException { runtime.getGlobalVariables().define( GlobalVariable.variableName(bean.name), new BeanGlobalVariable(runtime, bean), org.jruby.internal.runtime.GlobalVariable.Scope.GLOBAL); }
@Override public void initialize(BSFManager manager, String language, Vector someDeclaredBeans) throws BSFException { super.initialize(manager, language, someDeclaredBeans); runtime = JavaEmbedUtils.initialize(getClassPath(manager)); for (int i = 0, size = someDeclaredBeans.size(); i < size; i++) { BSFDeclaredBean bean = (BSFDeclaredBean) someDeclaredBeans.elementAt(i); runtime.getGlobalVariables().define( GlobalVariable.variableName(bean.name), new BeanGlobalVariable(runtime, bean), org.jruby.internal.runtime.GlobalVariable.Scope.GLOBAL); } runtime.getGlobalVariables().defineReadonly("$bsf", new FunctionsGlobalVariable(runtime, new BSFFunctions(manager, this)), org.jruby.internal.runtime.GlobalVariable.Scope.GLOBAL); }
public BSFExample(BSFManager manager) { this.manager = manager; /* * Initialize a simple Frame. */ initUI(); }
public static void main(String[] args) { /* * First we need to register the JRuby engine. */ BSFManager.registerScriptingEngine("ruby", "org.jruby.javasupport.bsf.JRubyEngine", new String[] { "rb" }); /* * Now we create a new BSFManager. */ new BSFExample(new BSFManager()); }
public void handleException(BSFException bsfExcptn) { printException(runtime, (Exception) bsfExcptn.getTargetException()); }
@Override public void declareBean(BSFDeclaredBean bean) throws BSFException { runtime.getGlobalVariables().define( GlobalVariable.variableName(bean.name), new BeanGlobalVariable(runtime, bean), org.jruby.internal.runtime.GlobalVariable.Scope.GLOBAL); }
@Override public void initialize(BSFManager manager, String language, Vector someDeclaredBeans) throws BSFException { super.initialize(manager, language, someDeclaredBeans); runtime = JavaEmbedUtils.initialize(getClassPath(manager)); for (int i = 0, size = someDeclaredBeans.size(); i < size; i++) { BSFDeclaredBean bean = (BSFDeclaredBean) someDeclaredBeans.elementAt(i); runtime.getGlobalVariables().define( GlobalVariable.variableName(bean.name), new BeanGlobalVariable(runtime, bean), org.jruby.internal.runtime.GlobalVariable.Scope.GLOBAL); } runtime.getGlobalVariables().defineReadonly("$bsf", new FunctionsGlobalVariable(runtime, new BSFFunctions(manager, this)), org.jruby.internal.runtime.GlobalVariable.Scope.GLOBAL); }
public BSFExample(BSFManager manager) { this.manager = manager; /* * Initialize a simple Frame. */ initUI(); }
public static void main(String[] args) { /* * First we need to register the JRuby engine. */ BSFManager.registerScriptingEngine("ruby", "org.jruby.javasupport.bsf.JRubyEngine", new String[] { "rb" }); /* * Now we create a new BSFManager. */ new BSFExample(new BSFManager()); }
public void handleException(BSFException bsfExcptn) { printException(runtime, (Exception) bsfExcptn.getTargetException()); }
@Override public void declareBean(BSFDeclaredBean bean) throws BSFException { runtime.getGlobalVariables().define( GlobalVariable.variableName(bean.name), new BeanGlobalVariable(runtime, bean), org.jruby.internal.runtime.GlobalVariable.Scope.GLOBAL); }
@Override public void initialize(BSFManager manager, String language, Vector someDeclaredBeans) throws BSFException { super.initialize(manager, language, someDeclaredBeans); runtime = JavaEmbedUtils.initialize(getClassPath(manager)); for (int i = 0, size = someDeclaredBeans.size(); i < size; i++) { BSFDeclaredBean bean = (BSFDeclaredBean) someDeclaredBeans.elementAt(i); runtime.getGlobalVariables().define( GlobalVariable.variableName(bean.name), new BeanGlobalVariable(runtime, bean), org.jruby.internal.runtime.GlobalVariable.Scope.GLOBAL); } runtime.getGlobalVariables().defineReadonly("$bsf", new FunctionsGlobalVariable(runtime, new BSFFunctions(manager, this)), org.jruby.internal.runtime.GlobalVariable.Scope.GLOBAL); }
public BSFExample(BSFManager manager) { this.manager = manager; /* * Initialize a simple Frame. */ initUI(); }
public static void main(String[] args) { /* * First we need to register the JRuby engine. */ BSFManager.registerScriptingEngine("ruby", "org.jruby.javasupport.bsf.JRubyEngine", new String[] { "rb" }); /* * Now we create a new BSFManager. */ new BSFExample(new BSFManager()); }
public void handleException(BSFException bsfExcptn) { printException(runtime, (Exception) bsfExcptn.getTargetException()); }
@Override public void declareBean(BSFDeclaredBean bean) throws BSFException { runtime.getGlobalVariables().define( GlobalVariable.variableName(bean.name), new BeanGlobalVariable(runtime, bean), org.jruby.internal.runtime.GlobalVariable.Scope.GLOBAL); }