return ((BasicLibraryService) clazz.newInstance()).basicLoad(runtime); } catch (ReflectiveOperationException e) { final RaiseException ex = runtime.newNameError("cannot instantiate (ext) Java class " + className, className, e, true);
} else if (libObject instanceof BasicLibraryService) { BasicLibraryService service = (BasicLibraryService)libObject; service.basicLoad(runtime); } else {
return ((BasicLibraryService) clazz.newInstance()).basicLoad(runtime); } catch (ReflectiveOperationException e) { final RaiseException ex = runtime.newNameError("cannot instantiate (ext) Java class " + className, className, e, true);
} else if (libObject instanceof BasicLibraryService) { BasicLibraryService service = (BasicLibraryService)libObject; service.basicLoad(runtime); } else {
} else if (libObject instanceof BasicLibraryService) { BasicLibraryService service = (BasicLibraryService)libObject; service.basicLoad(runtime); } else {
} else if (libObject instanceof BasicLibraryService) { BasicLibraryService service = (BasicLibraryService)libObject; service.basicLoad(runtime); } else {
/** * Load the given BasicLibraryService instance, wrapping it in Ruby framing * to ensure it is isolated from any parent scope. * * @param extName The name of the extension, to go on the frame wrapping it * @param extension The extension object to load * @param wrap Whether to use a new "self" for toplevel */ public void loadExtension(String extName, BasicLibraryService extension, boolean wrap) { IRubyObject self = wrap ? TopSelfFactory.createTopSelf(this, true) : getTopSelf(); ThreadContext context = getCurrentContext(); try { context.preExtensionLoad(self); extension.basicLoad(this); } catch (IOException ioe) { throw newIOErrorFromException(ioe); } finally { context.postNodeEval(); } }
/** * Load the given BasicLibraryService instance, wrapping it in Ruby framing * to ensure it is isolated from any parent scope. * * @param extName The name of the extension, to go on the frame wrapping it * @param extension The extension object to load * @param wrap Whether to use a new "self" for toplevel */ public void loadExtension(String extName, BasicLibraryService extension, boolean wrap) { IRubyObject self = wrap ? TopSelfFactory.createTopSelf(this, true) : getTopSelf(); ThreadContext context = getCurrentContext(); try { context.preExtensionLoad(self); extension.basicLoad(this); } catch (IOException ioe) { throw newIOErrorFromException(ioe); } finally { context.postNodeEval(); } }
/** * Load the given BasicLibraryService instance, wrapping it in Ruby framing * to ensure it is isolated from any parent scope. * * @param extName The name of the extension, to go on the frame wrapping it * @param extension The extension object to load * @param wrap Whether to use a new "self" for toplevel */ public void loadExtension(String extName, BasicLibraryService extension, boolean wrap) { IRubyObject self = wrap ? TopSelfFactory.createTopSelf(this) : getTopSelf(); ThreadContext context = getCurrentContext(); try { context.preExtensionLoad(self); extension.basicLoad(this); } catch (IOException ioe) { throw newIOErrorFromException(ioe); } catch (JumpException.ReturnJump rj) { return; } finally { context.postNodeEval(); } }
/** * Load the given BasicLibraryService instance, wrapping it in Ruby framing * to ensure it is isolated from any parent scope. * * @param extName The name of the extension, to go on the frame wrapping it * @param extension The extension object to load * @param wrap Whether to use a new "self" for toplevel */ public void loadExtension(String extName, BasicLibraryService extension, boolean wrap) { IRubyObject self = wrap ? TopSelfFactory.createTopSelf(this) : getTopSelf(); ThreadContext context = getCurrentContext(); try { context.preExtensionLoad(self); extension.basicLoad(this); } catch (IOException ioe) { throw newIOErrorFromException(ioe); } catch (JumpException.ReturnJump rj) { return; } finally { context.postNodeEval(); } }