bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public CommandlineParser(Main main, String[] arguments) { this.arguments = arguments; this.main = main; processArguments(); }
public CommandlineParser(String[] arguments) { this.arguments = arguments; this.main = main; processArguments(); }
3,233,861
public CommandlineParser(Main main, String[] arguments) { this.arguments = arguments; this.main = main; processArguments(); }
public CommandlineParser(Main main, String[] arguments) { this.arguments = arguments; this.main = main; processArguments(); }
3,233,862
private void processArgument() { String argument = arguments[argumentIndex]; FOR : for (characterIndex = 1; characterIndex < argument.length(); characterIndex++) { switch (argument.charAt(characterIndex)) { case 'h' : main.printUsage(); shouldRunInterpreter = false; break; case 'I' : String s = grabValue(" -I must be followed by a directory name to add to lib path"); String[] ls = s.split(":"); for(int i=0;i<ls.length;i++) { loadPaths.add(ls[i]); } break FOR; case 'r' : requiredLibraries.add(grabValue("-r must be followed by a package to require")); break FOR; case 'e' : inlineScript.append(grabValue(" -e must be followed by an expression to evaluate")); inlineScript.append('\n'); break FOR; case 'b' : benchmarking = true; break; case 'p' : assumePrinting = true; assumeLoop = true; break; case 'O' : objectSpaceEnabled = false; break; case 'C' : compilerEnabled = true; break; case 'n' : assumeLoop = true; break; case 'a' : split = true; break; case 'd' : debug = true; verbose = true; break; case 'l' : processLineEnds = true; break; case 'v' : verbose = true; setShowVersion(true); break; case 'w' : verbose = true; break; case 'K': // FIXME: No argument seems to work for -K in MRI plus this should not // siphon off additional args 'jruby -K ~/scripts/foo'. Also better error // processing. String eArg = grabValue("provide a value for -K"); if ("u".equals(eArg) || "U".equals(eArg) || "UTF8".equals(eArg)) { encoding = "UTF-8"; } break; case '-' : if (argument.equals("--version")) { setShowVersion(true); break FOR; } else if(argument.equals("--debug")) { debug = true; verbose = true; break; } else { if (argument.equals("--")) { // ruby interpreter compatibilty // Usage: ruby [switches] [--] [programfile] [arguments]) break FOR; } } default : throw new MainExitException(1, "unknown option " + argument.charAt(characterIndex)); } } }
private void processArgument() { String argument = arguments[argumentIndex]; FOR : for (characterIndex = 1; characterIndex < argument.length(); characterIndex++) { switch (argument.charAt(characterIndex)) { case 'h' : shouldPrintUsage = true; shouldRunInterpreter = false; break; case 'I' : String s = grabValue(" -I must be followed by a directory name to add to lib path"); String[] ls = s.split(":"); for(int i=0;i<ls.length;i++) { loadPaths.add(ls[i]); } break FOR; case 'r' : requiredLibraries.add(grabValue("-r must be followed by a package to require")); break FOR; case 'e' : inlineScript.append(grabValue(" -e must be followed by an expression to evaluate")); inlineScript.append('\n'); break FOR; case 'b' : benchmarking = true; break; case 'p' : assumePrinting = true; assumeLoop = true; break; case 'O' : objectSpaceEnabled = false; break; case 'C' : compilerEnabled = true; break; case 'n' : assumeLoop = true; break; case 'a' : split = true; break; case 'd' : debug = true; verbose = true; break; case 'l' : processLineEnds = true; break; case 'v' : verbose = true; setShowVersion(true); break; case 'w' : verbose = true; break; case 'K': // FIXME: No argument seems to work for -K in MRI plus this should not // siphon off additional args 'jruby -K ~/scripts/foo'. Also better error // processing. String eArg = grabValue("provide a value for -K"); if ("u".equals(eArg) || "U".equals(eArg) || "UTF8".equals(eArg)) { encoding = "UTF-8"; } break; case '-' : if (argument.equals("--version")) { setShowVersion(true); break FOR; } else if(argument.equals("--debug")) { debug = true; verbose = true; break; } else { if (argument.equals("--")) { // ruby interpreter compatibilty // Usage: ruby [switches] [--] [programfile] [arguments]) break FOR; } } default : throw new MainExitException(1, "unknown option " + argument.charAt(characterIndex)); } } }
3,233,863
private void processArguments() { while (argumentIndex < arguments.length && isInterpreterArgument(arguments[argumentIndex])) { processArgument(); argumentIndex++; } if (! hasInlineScript()) { if (argumentIndex < arguments.length) { setScriptFileName(arguments[argumentIndex]); //consume the file name argumentIndex++; } } // Remaining arguments are for the script itself scriptArguments = new String[arguments.length - argumentIndex]; System.arraycopy(arguments, argumentIndex, getScriptArguments(), 0, getScriptArguments().length); }
private void processArguments() { while (argumentIndex < arguments.length && isInterpreterArgument(arguments[argumentIndex])) { processArgument(); argumentIndex++; } if (! hasInlineScript()) { if (argumentIndex < arguments.length) { setScriptFileName(arguments[argumentIndex]); //consume the file name argumentIndex++; } } // Remaining arguments are for the script itself scriptArguments = new String[arguments.length - argumentIndex]; System.arraycopy(arguments, argumentIndex, getScriptArguments(), 0, getScriptArguments().length); }
3,233,864
public void loadPlugins() { // Delete all old plugins File[] oldFiles = PLUGINS_DIRECTORY.listFiles(); final int no = oldFiles != null ? oldFiles.length : 0; for (int i = 0; i < no; i++) { File file = oldFiles[i]; if (file.isDirectory()) { // Check to see if it has an associated .jar File jarFile = new File(PLUGINS_DIRECTORY, file.getName() + ".jar"); if (!jarFile.exists()) { uninstall(file); } } } updateClasspath(); // At the moment, the plug list is hardcode internally until I begin // using external property files. All depends on deployment. final URL url = getClass().getClassLoader().getResource("META-INF/plugins.xml"); try { InputStreamReader reader = new InputStreamReader(url.openStream()); loadInternalPlugins(reader); } catch (IOException e) { Log.error("Could not load plugins.xml file."); } // Load extension plugins loadPublicPlugins(); // For development purposes, load the plugin specified by -Dplugin=... String plugin = System.getProperty("plugin"); if (plugin != null) { StringTokenizer st = new StringTokenizer(plugin, ", ", false); while (st.hasMoreTokens()) { String token = st.nextToken(); File pluginXML = new File(token); loadPublicPlugin(pluginXML.getParentFile()); } } }
public void loadPlugins() { // Delete all old plugins File[] oldFiles = PLUGINS_DIRECTORY.listFiles(); final int no = oldFiles != null ? oldFiles.length : 0; for (int i = 0; i < no; i++) { File file = oldFiles[i]; if (file.isDirectory()) { // Check to see if it has an associated .jar File jarFile = new File(PLUGINS_DIRECTORY, file.getName() + ".jar"); if (!jarFile.exists()) { uninstall(file); } } } updateClasspath(); // At the moment, the plug list is hardcode internally until I begin // using external property files. All depends on deployment. final URL url = getClass().getClassLoader().getResource("META-INF/plugins.xml"); try { InputStreamReader reader = new InputStreamReader(url.openStream()); loadInternalPlugins(reader); } catch (IOException e) { Log.error("Could not load plugins.xml file."); } // Load extension plugins loadPublicPlugins(); // For development purposes, load the plugin specified by -Dplugin=... String plugin = System.getProperty("plugin"); if (plugin != null) { final StringTokenizer st = new StringTokenizer(plugin, ",", false); while (st.hasMoreTokens()) { String token = st.nextToken(); File pluginXML = new File(token); loadPublicPlugin(pluginXML.getParentFile()); } } }
3,233,868
public static RubyObject chdir(Ruby ruby, RubyObject recv, RubyString path) { System.setProperty("user.dir", getDir(ruby, path.toString()).toString()); return new RubyFixnum(ruby, 0); }
public static RubyObject chdir(Ruby ruby, RubyObject recv, RubyString path) { System.setProperty("user.dir", getDir(ruby, path.toString()).toString()); return RubyFixnum.newFixnum(ruby, 0); }
3,233,869
public RubyObject each() { String[] contents = snapshot; for (int i=0; i<contents.length; i++) { getRuby().yield(new RubyString(getRuby(),contents[i])); } return this; }
public RubyObject each() { String[] contents = snapshot; for (int i=0; i<contents.length; i++) { getRuby().yield(RubyString.newString(getRuby(), contents[i])); } return this; }
3,233,870
public static RubyObject mkdir(Ruby ruby, RubyObject recv, RubyObject[] args) { if (args.length < 1) { throw new ArgumentError(ruby, args.length, 1); } if (args.length > 2) { throw new ArgumentError(ruby, args.length, 2); } args[0].checkSafeString(); String path = args[0].toString(); File newDir = new File(path); if (newDir.exists()) { throw new IOError(ruby, path + " already exists"); } return new RubyBoolean(ruby, newDir.mkdir()); }
public static RubyObject mkdir(Ruby ruby, RubyObject recv, RubyObject[] args) { if (args.length < 1) { throw new ArgumentError(ruby, args.length, 1); } if (args.length > 2) { throw new ArgumentError(ruby, args.length, 2); } args[0].checkSafeString(); String path = args[0].toString(); File newDir = new File(path); if (newDir.exists()) { throw new IOError(ruby, path + " already exists"); } return RubyBoolean.newBoolean(ruby, newDir.mkdir()); }
3,233,871
public RubyObject rewind() { pos = 0; return new RubyFixnum(getRuby(), pos); }
public RubyObject rewind() { pos = 0; return RubyFixnum.newFixnum(getRuby(), pos); }
3,233,872
public static RubyObject rmdir(Ruby ruby, RubyObject recv, RubyString path) { new File(path.toString()).delete(); return new RubyFixnum(ruby, 0); }
public static RubyObject rmdir(Ruby ruby, RubyObject recv, RubyString path) { new File(path.toString()).delete(); return RubyFixnum.newFixnum(ruby, 0); }
3,233,873
public RubyInteger tell() { return new RubyFixnum(getRuby(), pos); }
public RubyInteger tell() { return RubyFixnum.newFixnum(getRuby(), pos); }
3,233,874
public void visitClassNode(ClassNode iVisited) { if (runtime.getRubyClass() == null) { throw new TypeError(runtime, "no outer class/module"); } RubyClass superClass = null; if (iVisited.getSuperNode() != null) { try { superClass = (RubyClass) eval(iVisited.getSuperNode()); } catch (Exception excptn) { if (iVisited.getSuperNode() instanceof Colon2Node) { throw new TypeError(runtime, "undefined superclass '" + ((Colon2Node) iVisited.getSuperNode()).getName() + "'"); } else if (iVisited.getSuperNode() instanceof ConstNode) { throw new TypeError(runtime, "undefined superclass '" + ((ConstNode) iVisited.getSuperNode()).getName() + "'"); } else { throw new TypeError(runtime, "undefined superclass"); } } if (superClass != null && superClass instanceof MetaClass) { throw new TypeError(runtime, "can't make subclass of virtual class"); } } RubyClass rubyClass = null; // if ((ruby_class == getRuby().getObjectClass()) && rb_autoload_defined(node.nd_cname())) { // rb_autoload_load(node.nd_cname()); // } if (runtime.getRubyClass().isConstantDefined(iVisited.getClassName())) { IRubyObject type = runtime.getRubyClass().getConstant(iVisited.getClassName()); if (!(type instanceof RubyClass)) { throw new TypeError(runtime, iVisited.getClassName() + " is not a class"); } else { rubyClass = (RubyClass)type; } if (superClass != null && rubyClass.getSuperClass().getRealClass() != superClass) { // FIXME add defineClassId again. rubyClass = runtime.defineClass(iVisited.getClassName(), superClass); rubyClass.setClassPath(runtime.getRubyClass(), iVisited.getClassName()); runtime.getRubyClass().setConstant(iVisited.getClassName(), rubyClass); } else { if (runtime.getSafeLevel() >= 4) { throw new SecurityError(runtime, "extending class prohibited"); } // rb_clear_cache(); } } else { if (superClass == null) { superClass = runtime.getClasses().getObjectClass(); } // FIXME see above rubyClass = runtime.defineClass(iVisited.getClassName(), superClass); runtime.getRubyClass().setConstant(iVisited.getClassName(), rubyClass); rubyClass.setClassPath(runtime.getRubyClass(), iVisited.getClassName()); } if (runtime.getWrapper() != null) { rubyClass.extendObject(runtime.getWrapper()); rubyClass.includeModule(runtime.getWrapper()); } evalClassDefinitionBody(iVisited.getBodyNode(), rubyClass); }
public void visitClassNode(ClassNode iVisited) { if (runtime.getRubyClass().isNil()) { throw new TypeError(runtime, "no outer class/module"); } RubyClass superClass = null; if (iVisited.getSuperNode() != null) { try { superClass = (RubyClass) eval(iVisited.getSuperNode()); } catch (Exception excptn) { if (iVisited.getSuperNode() instanceof Colon2Node) { throw new TypeError(runtime, "undefined superclass '" + ((Colon2Node) iVisited.getSuperNode()).getName() + "'"); } else if (iVisited.getSuperNode() instanceof ConstNode) { throw new TypeError(runtime, "undefined superclass '" + ((ConstNode) iVisited.getSuperNode()).getName() + "'"); } else { throw new TypeError(runtime, "undefined superclass"); } } if (superClass != null && superClass instanceof MetaClass) { throw new TypeError(runtime, "can't make subclass of virtual class"); } } RubyClass rubyClass = null; // if ((ruby_class == getRuby().getObjectClass()) && rb_autoload_defined(node.nd_cname())) { // rb_autoload_load(node.nd_cname()); // } if (runtime.getRubyClass().isConstantDefined(iVisited.getClassName())) { IRubyObject type = runtime.getRubyClass().getConstant(iVisited.getClassName()); if (!(type instanceof RubyClass)) { throw new TypeError(runtime, iVisited.getClassName() + " is not a class"); } else { rubyClass = (RubyClass)type; } if (superClass != null && rubyClass.getSuperClass().getRealClass() != superClass) { // FIXME add defineClassId again. rubyClass = runtime.defineClass(iVisited.getClassName(), superClass); rubyClass.setClassPath(runtime.getRubyClass(), iVisited.getClassName()); runtime.getRubyClass().setConstant(iVisited.getClassName(), rubyClass); } else { if (runtime.getSafeLevel() >= 4) { throw new SecurityError(runtime, "extending class prohibited"); } // rb_clear_cache(); } } else { if (superClass == null) { superClass = runtime.getClasses().getObjectClass(); } // FIXME see above rubyClass = runtime.defineClass(iVisited.getClassName(), superClass); runtime.getRubyClass().setConstant(iVisited.getClassName(), rubyClass); rubyClass.setClassPath(runtime.getRubyClass(), iVisited.getClassName()); } if (runtime.getWrapper() != null) { rubyClass.extendObject(runtime.getWrapper()); rubyClass.includeModule(runtime.getWrapper()); } evalClassDefinitionBody(iVisited.getBodyNode(), rubyClass); }
3,233,875
public RubyClass newSubClass(String name, RubyModule parent) { return new ArrayMetaClass(name, this, parent); }
public RubyClass newSubClass(String name, RubyModule parent) { return new ArrayMetaClass(name, this, parent); }
3,233,877
public static RubyClass createIntegerClass(Ruby ruby) { return new IntegerDefinition(ruby).getType(); }
public static RubyClass createIntegerClass(Ruby ruby) { RubyClass result = ruby.defineClass("Integer", ruby.getClasses().getNumericClass()); CallbackFactory callbackFactory = ruby.callbackFactory(); result.includeModule(ruby.getClasses().getEnumerableModule()); result.defineMethod("chr", callbackFactory.getMethod(RubyInteger.class, "chr")); result.defineMethod("downto", callbackFactory.getMethod(RubyInteger.class, "downto", RubyNumeric.class)); result.defineMethod("integer?", callbackFactory.getMethod(RubyInteger.class, "int_p")); result.defineMethod("next", callbackFactory.getMethod(RubyInteger.class, "next")); result.defineMethod("step", callbackFactory.getMethod(RubyInteger.class, "step", RubyNumeric.class, RubyNumeric.class)); result.defineMethod("succ", callbackFactory.getMethod(RubyInteger.class, "next")); result.defineMethod("times", callbackFactory.getMethod(RubyInteger.class, "times")); result.defineMethod("upto", callbackFactory.getMethod(RubyInteger.class, "upto", RubyNumeric.class)); result.getMetaClass().undefineMethod("new"); result.defineSingletonMethod("induced_from", callbackFactory.getSingletonMethod(RubyInteger.class, "induced_from", IRubyObject.class)); return result; }
3,233,878
public IRubyObject downto(IRubyObject val) { RubyNumeric to = numericValue(val); RubyNumeric i = this; while (true) { if (i.callMethod("<", to).isTrue()) { break; } getRuntime().yield(i); i = (RubyNumeric) i.callMethod("-", RubyFixnum.one(getRuntime())); } return this; }
public IRubyObject downto(IRubyObject val) { RubyNumeric to = numericValue(val); RubyNumeric i = this; while (true) { if (i.callMethod("<", to).isTrue()) { break; } getRuntime().yield(i); i = (RubyNumeric) i.callMethod("-", RubyFixnum.one(getRuntime())); } return this; }
3,233,879
public IRubyObject step(IRubyObject toVal, IRubyObject stepVal) { RubyNumeric to = numericValue(toVal); RubyNumeric step = numericValue(stepVal); RubyNumeric i = this; if (step.getLongValue() == 0) { throw new ArgumentError(getRuntime(), "step cannot be 0"); } String cmp = "<"; if (((RubyBoolean) step.callMethod("<", RubyFixnum.newFixnum(getRuntime(), 0))).isFalse()) { cmp = ">"; } while (true) { if (i.callMethod(cmp, to).isTrue()) { break; } getRuntime().yield(i); i = (RubyNumeric) i.callMethod("+", step); } return this; }
public IRubyObject step(IRubyObject toVal, IRubyObject stepVal) { RubyNumeric to = numericValue(toVal); RubyNumeric step = numericValue(stepVal); RubyNumeric i = this; if (step.getLongValue() == 0) { throw new ArgumentError(getRuntime(), "step cannot be 0"); } String cmp = "<"; if (((RubyBoolean) step.callMethod("<", RubyFixnum.newFixnum(getRuntime(), 0))).isFalse()) { cmp = ">"; } while (true) { if (i.callMethod(cmp, to).isTrue()) { break; } getRuntime().yield(i); i = (RubyNumeric) i.callMethod("+", step); } return this; }
3,233,880
public IRubyObject upto(IRubyObject val) { RubyNumeric to = numericValue(val); RubyNumeric i = this; while (true) { if (i.callMethod(">", to).isTrue()) { break; } getRuntime().yield(i); i = (RubyNumeric) i.callMethod("+", RubyFixnum.one(getRuntime())); } return this; }
public IRubyObject upto(IRubyObject val) { RubyNumeric to = numericValue(val); RubyNumeric i = this; while (true) { if (i.callMethod(">", to).isTrue()) { break; } getRuntime().yield(i); i = (RubyNumeric) i.callMethod("+", RubyFixnum.one(getRuntime())); } return this; }
3,233,881
public void setOnScreen() { setSize(EDITOR_WIDTH, EDITOR_HEIGHT); UIUtilities.centerAndShow(this); }
public void setOnScreen() { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); int width = 8*(screenSize.width/10); int height = 8*(screenSize.height/10); setSize(width, height); UIUtilities.centerAndShow(this); }
3,233,882
public Note(String name, NoteHolder holder, String text) { this.name = name; if (holder instanceof Note) parent = (Note) holder; this.notes = new LinkedList<Note>(); this.text = text; holder.addNote(this); }
public Note(String name, NoteHolder holder, String text) { this.name = name; if (holder instanceof Note) parent = (Note) holder; this.notes = new LinkedList<Note>(); this.text = text; holder.addNote(this); }
3,233,883
public RubyNumeric op_div(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue() / getDoubleValue()); }
public RubyNumeric op_div(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue() / other.getDoubleValue()); }
3,233,884
public RubyNumeric op_minus(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue() - getDoubleValue()); }
public RubyNumeric op_minus(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue() - other.getDoubleValue()); }
3,233,885
public RubyNumeric op_mod(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue() % getDoubleValue()); }
public RubyNumeric op_mod(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue() % other.getDoubleValue()); }
3,233,886
public RubyNumeric op_mul(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue() * getDoubleValue()); }
public RubyNumeric op_mul(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue() * other.getDoubleValue()); }
3,233,887
public RubyNumeric op_plus(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue() + getDoubleValue()); }
public RubyNumeric op_plus(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), getDoubleValue() + other.getDoubleValue()); }
3,233,888
public RubyNumeric op_pow(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), Math.pow(getDoubleValue(), getDoubleValue())); }
public RubyNumeric op_pow(RubyNumeric other) { return RubyFloat.m_newFloat(getRuby(), Math.pow(getDoubleValue(), other.getDoubleValue())); }
3,233,889
public LogFile(Settings s) throws FileNotFoundException { this(s.getSetting("LogFile")); _trace = s.getBooleanSetting("LogTraceExceptions"); String slevel = s.getSetting("LogLevel", "NOTICE"); _defaultLevel = LogSystem.getLevel(slevel); String format = s.getSetting("LogFormat"); if (format != null) { _mf = new MessageFormat(format); } Settings levels = s.getSubSettings("LogLevel"); String[] keys = levels.keys(); for (int i = 0; i < keys.length; i++) { _levels.put(keys[i], levels.getSetting(keys[i])); } }
public LogFile(Settings s) throws FileNotFoundException { this(s.getSetting("LogFile")); _trace = s.getBooleanSetting("LogTraceExceptions"); String slevel = s.getSetting("LogLevel", "NOTICE"); _defaultLevel = LogSystem.getLevel(slevel); String format = s.getSetting("LogFormat"); if (format != null) { _mf = new MessageFormat(format); } Settings levels = s.getSubSettings("LogLevel"); String[] keys = levels.keys(); for (int i = 0; i < keys.length; i++) { _levels.put(keys[i], new Integer(LogSystem.getLevel(levels.getSetting(keys[i])))); } }
3,233,890
public void write(FastWriter out, Context context) throws PropertyException, IOException { for (int i = 0; i < nConditions; i++) { boolean b = false; try { b = Expression.isTrue(conditions[i].evaluate(context)); } catch (Exception e) { String warning = "#if: Error evaluating condition: " + e; writeWarning(warning, context, out); } if (b) { blocks[i].write(out, context); return; } } // If we fell out, we ran out of conditions, try the else block if any if (elseBlock != null) elseBlock.write(out, context); }
public void write(FastWriter out, Context context) throws PropertyException, IOException { for (int i = 0; i < nConditions; i++) { boolean b = false; try { b = Expression.isTrue(conditions[i].evaluate(context)); } catch (Exception e) { String warning = "#if: Error evaluating condition: " + e; writeWarning(warning, context, out); } if (b) { blocks[i].write(out, context); return; } } // If we fell out, we ran out of conditions, try the else block if any if (elseBlock != null) elseBlock.write(out, context); }
3,233,891
void addNewUser() { if (model.findUserByName("NewUser")) { view .showErrorMessage("You have already created a user called \'NewUser\'." + "This is the user you should rename/modify."); return; } try { Experimenter user = model.createNewUser(); model.addUser(user); } catch (Exception e) { handleException(e, "Add New User to server"); } view.clearForm(); view.setToTop(); view.refresh(); }
void addNewUser() { if (model.findUserByName("NewUser")) { view .showErrorMessage("You have already created a user called \'NewUser\'." + "This is the user you should rename/modify."); return; } try { Experimenter user = model.createNewUser(); model.addUser(user); } catch (Exception e) { handleException(e, "Add New User to server"); } view.clearForm(); view.setToTop(); view.refresh(); }
3,233,892
public IRubyObject aref(IRubyObject[] args) { int argc = argCount(args, 1, 2); if (argc == 2) { long beg = RubyNumeric.fix2long(args[0]); long len = RubyNumeric.fix2long(args[1]); if (beg < 0) { beg += getSize(); } return subseq(beg, len); } if (args[0] instanceof RubyFixnum) { return group(RubyNumeric.fix2long(args[0])); } if (args[0] instanceof RubyBignum) { throw new IndexError(getRuntime(), "index too big"); } if (args[0] instanceof RubyRange) { long[] begLen = ((RubyRange) args[0]).getBeginLength(getSize(), true, false); if (begLen != null) { return getRuntime().getNil(); } return subseq(begLen[0], begLen[1]); } return group(RubyNumeric.num2long(args[0])); }
public IRubyObject aref(IRubyObject[] args) { int argc = argCount(args, 1, 2); if (argc == 2) { long beg = RubyNumeric.fix2long(args[0]); long len = RubyNumeric.fix2long(args[1]); if (beg < 0) { beg += getSize(); } return subseq(beg, len); } if (args[0] instanceof RubyFixnum) { return group(RubyNumeric.fix2long(args[0])); } if (args[0] instanceof RubyBignum) { throw new IndexError(getRuntime(), "index too big"); } if (args[0] instanceof RubyRange) { long[] begLen = ((RubyRange) args[0]).getBeginLength(getSize(), true, false); if (begLen == null) { return getRuntime().getNil(); } return subseq(begLen[0], begLen[1]); } return group(RubyNumeric.num2long(args[0])); }
3,233,894
public RubyString string() { return RubyString.newString(getRuntime(), str); }
public RubyString string() { RubyString frozenString = RubyString.newString(getRuntime(), str); frozenString.freeze(); return frozenString; }
3,233,895
public RubyArray subseq(long beg, long len) { if (beg > getSize()) { return RubyArray.nilArray(getRuntime()); } if (beg < 0 || len < 0) { return RubyArray.nilArray(getRuntime()); } if (beg + len > getSize()) { len = getSize() - beg; } if (len < 0) { len = 0; } if (len == 0) { return RubyArray.newArray(getRuntime()); } RubyArray arr = RubyArray.newArray(getRuntime(), 0); for (long i = beg; i < beg + len; i++) { arr.append(group(i)); } return arr; }
public RubyArray subseq(long beg, long len) { if (beg > getSize()) { return RubyArray.nilArray(getRuntime()); } if (beg < 0 || len < 0) { return RubyArray.nilArray(getRuntime()); } if (beg + len > getSize()) { len = getSize() - beg; } if (len < 0) { len = 0; } if (len == 0) { return RubyArray.newArray(getRuntime()); } RubyArray arr = RubyArray.newArray(getRuntime(), 0); for (long i = beg; i < beg + len; i++) { arr.append(group(i)); } return arr; }
3,233,896
public static IObject createAnnotation(IObject annotatedObject, AnnotationData data) { if (annotatedObject instanceof Dataset) { Dataset m = (Dataset) annotatedObject; DatasetAnnotation annotation = new DatasetAnnotation(); annotation.setContent(data.getText()); annotation.setDataset(m); return annotation; } else if (annotatedObject instanceof ImageData) { Image m = new Image(new Long(annotatedObject.getId()), false); ImageAnnotation annotation = new ImageAnnotation(); annotation.setContent(data.getText()); annotation.setImage(m); return annotation; } throw new IllegalArgumentException("DataObject cannot be annotated."); }
public static IObject createAnnotation(IObject annotatedObject, AnnotationData data) { if (annotatedObject instanceof Dataset) { Dataset m = (Dataset) annotatedObject; DatasetAnnotation annotation = new DatasetAnnotation(); annotation.setContent(data.getText()); annotation.setDataset(m); return annotation; } else if (annotatedObject instanceof ImageData) { Image m = new Image(annotatedObject.getId(), false); ImageAnnotation annotation = new ImageAnnotation(); annotation.setContent(data.getText()); annotation.setImage(m); return annotation; } throw new IllegalArgumentException("DataObject cannot be annotated."); }
3,233,897
public void invoke(final String jid) { this.jid = jid; final Roster roster = SparkManager.getConnection().getRoster(); // If User is already in roster, do not show. RosterEntry entry = roster.getEntry(jid); if (entry != null && entry.getType() == RosterPacket.ItemType.TO) { Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); return; } String message = Res.getString("message.approve.subscription", UserManager.unescapeJID(jid)); Transport transport = TransportUtils.getTransport(StringUtils.parseServer(jid)); Icon icon = null; if (transport != null) { icon = transport.getIcon(); } messageLabel = new TitlePanel("", message, icon, true); // Add Message Label mainPanel.add(messageLabel, new GridBagConstraints(0, 0, 6, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); String username = StringUtils.parseName(UserManager.unescapeJID(jid)); usernameLabelValue.setText(UserManager.unescapeJID(jid)); nicknameField.setText(username); acceptButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (!rosterBox.isSelected()) { Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); dialog.dispose(); return; } boolean addEntry = addEntry(); if (addEntry) { Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); } else { dialog.dispose(); } } }); denyButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Send subscribed Presence response = new Presence(Presence.Type.unsubscribe); response.setTo(jid); SparkManager.getConnection().sendPacket(response); dialog.dispose(); } }); viewInfoButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { SparkManager.getVCardManager().viewProfile(jid, mainPanel); } }); dialog = new JFrame("Subscription Request"); dialog.setIconImage(SparkRes.getImageIcon(SparkRes.MAIN_IMAGE).getImage()); dialog.getContentPane().add(mainPanel); dialog.pack(); dialog.setSize(400, 225); dialog.setLocationRelativeTo(SparkManager.getMainWindow()); if (SparkManager.getMainWindow().isFocused()) { dialog.setState(Frame.NORMAL); dialog.setVisible(true); } else if (!SparkManager.getMainWindow().isVisible() || !SparkManager.getMainWindow().isFocused()) { dialog.setFocusableWindowState(false); dialog.setState(Frame.ICONIFIED); dialog.setVisible(true); SparkManager.getAlertManager().flashWindowStopOnFocus(dialog); dialog.setFocusableWindowState(true); } }
public void invoke(final String jid) { this.jid = jid; final Roster roster = SparkManager.getConnection().getRoster(); // If User is already in roster, do not show. RosterEntry entry = roster.getEntry(jid); if (entry != null && entry.getType() == RosterPacket.ItemType.TO) { Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); return; } String message = Res.getString("message.approve.subscription", UserManager.unescapeJID(jid)); Transport transport = TransportUtils.getTransport(StringUtils.parseServer(jid)); Icon icon = null; if (transport != null) { icon = transport.getIcon(); } messageLabel = new TitlePanel("", message, icon, true); // Add Message Label mainPanel.add(messageLabel, new GridBagConstraints(0, 0, 6, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); String username = StringUtils.parseName(UserManager.unescapeJID(jid)); usernameLabelValue.setText(UserManager.unescapeJID(jid)); nicknameField.setText(username); acceptButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (!rosterBox.isSelected()) { Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); dialog.dispose(); return; } boolean addEntry = addEntry(); if (addEntry) { Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); } else { dialog.dispose(); } } }); denyButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Send subscribed Presence response = new Presence(Presence.Type.unsubscribe); response.setTo(jid); SparkManager.getConnection().sendPacket(response); dialog.dispose(); } }); viewInfoButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { SparkManager.getVCardManager().viewProfile(jid, mainPanel); } }); dialog = new JFrame("Subscription Request"); dialog.setIconImage(SparkRes.getImageIcon(SparkRes.MAIN_IMAGE).getImage()); dialog.getContentPane().add(mainPanel); dialog.pack(); dialog.setSize(400, 250); dialog.setLocationRelativeTo(SparkManager.getMainWindow()); if (SparkManager.getMainWindow().isFocused()) { dialog.setState(Frame.NORMAL); dialog.setVisible(true); } else if (!SparkManager.getMainWindow().isVisible() || !SparkManager.getMainWindow().isFocused()) { dialog.setFocusableWindowState(false); dialog.setState(Frame.ICONIFIED); dialog.setVisible(true); SparkManager.getAlertManager().flashWindowStopOnFocus(dialog); dialog.setFocusableWindowState(true); } }
3,233,898
public IRubyObject op_cmp(IRubyObject other) { RubyArray ary = other.convertToArray(); int otherLen = ary.getLength(); int len = getLength(); if (len != otherLen) { return (len > otherLen) ? RubyFixnum.one(getRuntime()) : RubyFixnum.minus_one(getRuntime()); } ThreadContext context = getRuntime().getCurrentContext(); for (int i = 0; i < len; i++) { IRubyObject result = entry(i).callMethod(context, "<=>", ary.entry(i)); if (result.isNil() || ((RubyFixnum)result).getLongValue() != 0) { return result; } } return RubyFixnum.zero(getRuntime()); }
public IRubyObject op_cmp(IRubyObject other) { RubyArray ary = other.convertToArray(); int otherLen = ary.getLength(); int len = getLength(); if (len != otherLen) { return (len > otherLen) ? RubyFixnum.one(getRuntime()) : RubyFixnum.minus_one(getRuntime()); } ThreadContext context = getRuntime().getCurrentContext(); for (int i = 0; i < len; i++) { IRubyObject result = entry(i).callMethod(context, "<=>", ary.entry(i)); if (result.isNil() || ((RubyFixnum)result).getLongValue() != 0) { return result; } } return RubyFixnum.zero(getRuntime()); }
3,233,899
public IRubyObject op_cmp(IRubyObject other) { RubyArray ary = other.convertToArray(); int otherLen = ary.getLength(); int len = getLength(); if (len != otherLen) { return (len > otherLen) ? RubyFixnum.one(getRuntime()) : RubyFixnum.minus_one(getRuntime()); } ThreadContext context = getRuntime().getCurrentContext(); for (int i = 0; i < len; i++) { IRubyObject result = entry(i).callMethod(context, "<=>", ary.entry(i)); if (result.isNil() || ((RubyFixnum)result).getLongValue() != 0) { return result; } } return RubyFixnum.zero(getRuntime()); }
public IRubyObject op_cmp(IRubyObject other) { RubyArray ary = other.convertToArray(); int otherLen = ary.getLength(); int len = getLength(); if (len != otherLen) { return (len > otherLen) ? RubyFixnum.one(getRuntime()) : RubyFixnum.minus_one(getRuntime()); } ThreadContext context = getRuntime().getCurrentContext(); RubyClass fixnumClass = getRuntime().getClass("Fixnum"); for (int i = 0; i < minCommon; i++) { IRubyObject result = entry(i).callMethod(context, "<=>", ary.entry(i)); if (result.isNil() || ((RubyFixnum)result).getLongValue() != 0) { return result; } } return RubyFixnum.zero(getRuntime()); }
3,233,900
public IRubyObject op_cmp(IRubyObject other) { RubyArray ary = other.convertToArray(); int otherLen = ary.getLength(); int len = getLength(); if (len != otherLen) { return (len > otherLen) ? RubyFixnum.one(getRuntime()) : RubyFixnum.minus_one(getRuntime()); } ThreadContext context = getRuntime().getCurrentContext(); for (int i = 0; i < len; i++) { IRubyObject result = entry(i).callMethod(context, "<=>", ary.entry(i)); if (result.isNil() || ((RubyFixnum)result).getLongValue() != 0) { return result; } } return RubyFixnum.zero(getRuntime()); }
public IRubyObject op_cmp(IRubyObject other) { RubyArray ary = other.convertToArray(); int otherLen = ary.getLength(); int len = getLength(); if (len != otherLen) { return (len > otherLen) ? RubyFixnum.one(getRuntime()) : RubyFixnum.minus_one(getRuntime()); } ThreadContext context = getRuntime().getCurrentContext(); for (int i = 0; i < len; i++) { IRubyObject result = entry(i).callMethod(context, "<=>", ary.entry(i)); if (result.isNil() || ((RubyFixnum)result).getLongValue() != 0) { return result; } } return RubyFixnum.zero(getRuntime()); }
3,233,901
public IRubyObject op_cmp(IRubyObject other) { RubyArray ary = other.convertToArray(); int otherLen = ary.getLength(); int len = getLength(); if (len != otherLen) { return (len > otherLen) ? RubyFixnum.one(getRuntime()) : RubyFixnum.minus_one(getRuntime()); } ThreadContext context = getRuntime().getCurrentContext(); for (int i = 0; i < len; i++) { IRubyObject result = entry(i).callMethod(context, "<=>", ary.entry(i)); if (result.isNil() || ((RubyFixnum)result).getLongValue() != 0) { return result; } } return RubyFixnum.zero(getRuntime()); }
if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } publicif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } IRubyObjectif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } op_cmp(IRubyObjectif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } other)if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } {if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } RubyArrayif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } aryif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } =if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } other.convertToArray();if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } intif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } otherLenif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } =if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } ary.getLength();if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } intif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } lenif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } =if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } getLength();if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } ifif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } (lenif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } !=if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } otherLen)if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } {if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } returnif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } (lenif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } >if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } otherLen)if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } ?if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } RubyFixnum.one(getRuntime())if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } :if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } RubyFixnum.minus_one(getRuntime());if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } }if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } ThreadContextif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } contextif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } =if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } getRuntime().getCurrentContext();if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } forif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } (intif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } iif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } =if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } 0;if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } iif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } <if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } len;if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } i++)if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } {if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } IRubyObjectif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } resultif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } =if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } entry(i).callMethod(context,if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } "<=>",if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } ary.entry(i));if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } ifif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } (result.isNil()if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } ||if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } ((RubyFixnum)result).getLongValue()if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } !=if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } 0)if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } {if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } returnif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } result;if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } }if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } }if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } returnif (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } RubyFixnum.zero(getRuntime());if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } if (len != otherLen) { return len < otherLen ? RubyFixnum.minus_one(getRuntime()) : RubyFixnum.one(getRuntime()); } }
3,233,902
public void mousePressed(MouseEvent me) { ImageDisplay d = findParentDisplay(me.getSource()); d.moveToFront(); model.setSelectedDisplay(d); view.setTitle(model.currentPathString()); if (me.isPopupTrigger()) popupTrigger = true; }
public void mousePressed(MouseEvent me) { ImageDisplay d = findParentDisplay(me.getSource()); d.moveToFront(); model.setSelectedDisplay(d); if (me.isPopupTrigger()) popupTrigger = true; }
3,233,904
public void refreshTree() { switch (model.getState()) { case LOADING_DATA: case LOADING_LEAVES: case DISCARDED: throw new IllegalStateException( "This method cannot be invoked in the LOADING_DATA, "+ " LOADING_LEAVES or DISCARDED state."); } TreeImageDisplay root = view.getTreeRoot(); if (!root.isChildrenLoaded()) return; if (!model.isSelected()) { //view.clearTree(); //return; } if (model.getBrowserType() == IMAGES_EXPLORER) { root.removeAllChildrenDisplay(); model.setSelectedDisplay(root); loadFilteredImagesForHierarchy(); } else { RefreshVisitor visitor = new RefreshVisitor(this); accept(visitor, TreeImageDisplayVisitor.TREEIMAGE_SET_ONLY); root.removeAllChildrenDisplay(); model.setSelectedDisplay(root); if (visitor.getFoundNodes().size() == 0) loadData(); else model.loadRefreshedData(visitor.getFoundNodes()); } }
public void refreshTree() { switch (model.getState()) { case LOADING_DATA: case LOADING_LEAVES: case DISCARDED: throw new IllegalStateException( "This method cannot be invoked in the LOADING_DATA, "+ " LOADING_LEAVES or DISCARDED state."); } TreeImageDisplay root = view.getTreeRoot(); if (!root.isChildrenLoaded()) return; if (!model.isSelected()) { //view.clearTree(); //return; } if (model.getBrowserType() == IMAGES_EXPLORER) { root.removeAllChildrenDisplay(); model.setSelectedDisplay(root); loadFilteredImagesForHierarchy(); } else { RefreshVisitor visitor = new RefreshVisitor(this); accept(visitor, TreeImageDisplayVisitor.TREEIMAGE_SET_ONLY); root.removeAllChildrenDisplay(); model.setSelectedDisplay(root); if (visitor.getFoundNodes().size() == 0) loadData(); else model.loadRefreshedData(visitor.getFoundNodes()); } }
3,233,905
public void setContainerNodes(Set nodes, TreeImageDisplay parent) { int state = model.getState(); if (state != LOADING_DATA) throw new IllegalStateException( "This method can only be invoked in the LOADING_DATA "+ "state."); if (nodes == null) throw new NullPointerException("No nodes."); TreeImageDisplay parentDisplay = model.getLastSelectedDisplay(); long userID = model.getUserID(); long groupID = model.getRootGroupID(); if (parent == null) { //root view.setViews(TreeViewerTranslator.transformHierarchy(nodes, userID, groupID), true); } else view.setViews(TreeViewerTranslator.transformContainers(nodes, userID, groupID), parentDisplay); if (parentDisplay != null) parentDisplay.setChildrenLoaded(Boolean.TRUE); model.fireContainerCountLoading(); model.getParentModel().setStatus(false, "", true); fireStateChange(); }
public void setContainerNodes(Set nodes, TreeImageDisplay parent) { int state = model.getState(); if (state != LOADING_DATA) throw new IllegalStateException( "This method can only be invoked in the LOADING_DATA "+ "state."); if (nodes == null) throw new NullPointerException("No nodes."); TreeImageDisplay parentDisplay = model.getLastSelectedDisplay(); long userID = model.getUserID(); long groupID = model.getRootGroupID(); if (parent == null) { //root view.setViews(TreeViewerTranslator.transformHierarchy(nodes, userID, groupID)); } else view.setViews(TreeViewerTranslator.transformContainers(nodes, userID, groupID), parentDisplay); if (parentDisplay != null) parentDisplay.setChildrenLoaded(Boolean.TRUE); model.fireContainerCountLoading(); model.getParentModel().setStatus(false, "", true); fireStateChange(); }
3,233,906
public void setNodes(Set nodes) { if (model.getState() != LOADING_DATA) throw new IllegalStateException( "This method can only be invoked in the LOADING_DATA "+ "state."); if (nodes == null) throw new NullPointerException("No nodes."); long userID = model.getUserID(); long groupID = model.getRootGroupID(); Set visNodes = TreeViewerTranslator.transformHierarchy(nodes, userID, groupID); view.setViews(visNodes, true); model.setState(READY); model.getParentModel().setStatus(false, "", true); fireStateChange(); }
public void setNodes(Set nodes) { if (model.getState() != LOADING_DATA) throw new IllegalStateException( "This method can only be invoked in the LOADING_DATA "+ "state."); if (nodes == null) throw new NullPointerException("No nodes."); long userID = model.getUserID(); long groupID = model.getRootGroupID(); Set visNodes = TreeViewerTranslator.transformHierarchy(nodes, userID, groupID); view.setViews(visNodes); model.setState(READY); model.getParentModel().setStatus(false, "", true); fireStateChange(); }
3,233,907
public void setRefreshedHierarchy(Map nodes) { if (model.getState() != LOADING_DATA) throw new IllegalStateException("This method cannot be invoked "+ "in the LOADING_DATA state."); long userID = model.getUserID(); long groupID = model.getRootGroupID(); view.setViews(TreeViewerTranslator.refreshHierarchy(nodes, userID, groupID), false); model.fireContainerCountLoading(); model.getParentModel().setStatus(false, "", true); fireStateChange(); }
public void setRefreshedHierarchy(Map nodes, List expandedTopNodes) { if (model.getState() != LOADING_DATA) throw new IllegalStateException("This method cannot be invoked "+ "in the LOADING_DATA state."); long userID = model.getUserID(); long groupID = model.getRootGroupID(); view.setViews(TreeViewerTranslator.refreshHierarchy(nodes, userID, groupID), false); model.fireContainerCountLoading(); model.getParentModel().setStatus(false, "", true); fireStateChange(); }
3,233,908
public void setRefreshedHierarchy(Map nodes) { if (model.getState() != LOADING_DATA) throw new IllegalStateException("This method cannot be invoked "+ "in the LOADING_DATA state."); long userID = model.getUserID(); long groupID = model.getRootGroupID(); view.setViews(TreeViewerTranslator.refreshHierarchy(nodes, userID, groupID), false); model.fireContainerCountLoading(); model.getParentModel().setStatus(false, "", true); fireStateChange(); }
public void setRefreshedHierarchy(Map nodes) { if (model.getState() != LOADING_DATA) throw new IllegalStateException("This method cannot be invoked "+ "in the LOADING_DATA state."); long userID = model.getUserID(); long groupID = model.getRootGroupID(); view.setViews(TreeViewerTranslator.refreshHierarchy(nodes, userID, groupID), false); model.fireContainerCountLoading(); model.getParentModel().setStatus(false, "", true); fireStateChange(); }
3,233,909
List getImagesInUserDatasetsDiff(DatasetData data) { List imagesDiff = new ArrayList(); try { imagesDiff = getUsedImages(); List images = data.getImages(); ImageSummary isg; Iterator i; for (int j = 0; j < imagesDiff.size(); j++) { isg = (ImageSummary) imagesDiff.get(j); i = images.iterator(); while (i.hasNext()) { if (((ImageSummary) i.next()).getID() == isg.getID()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; }
List getImagesInUserDatasetsDiff(DatasetData data, List datasets) { List imagesDiff = new ArrayList(); try { imagesDiff = getUsedImages(); List images = data.getImages(); ImageSummary isg; Iterator i; for (int j = 0; j < imagesDiff.size(); j++) { isg = (ImageSummary) imagesDiff.get(j); i = images.iterator(); while (i.hasNext()) { if (((ImageSummary) i.next()).getID() == isg.getID()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; }
3,233,910
List getImagesInUserDatasetsDiff(DatasetData data) { List imagesDiff = new ArrayList(); try { imagesDiff = getUsedImages(); List images = data.getImages(); ImageSummary isg; Iterator i; for (int j = 0; j < imagesDiff.size(); j++) { isg = (ImageSummary) imagesDiff.get(j); i = images.iterator(); while (i.hasNext()) { if (((ImageSummary) i.next()).getID() == isg.getID()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; }
List getImagesInUserDatasetsDiff(DatasetData data) { List imagesDiff = new ArrayList(); try { imagesDiff = getImagesInDatasets(datasets); List images = data.getImages(); ImageSummary isg; Iterator i; for (int j = 0; j < imagesDiff.size(); j++) { isg = (ImageSummary) imagesDiff.get(j); i = images.iterator(); while (i.hasNext()) { if (((ImageSummary) i.next()).getID() == isg.getID()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; }
3,233,911
List retrieveImagesDiffInUserDatasetsNotInCategoryGroup(CategoryData data) { List imagesDiff = new ArrayList(); try { imagesDiff = retrieveImagesInUserDatasetsNotInCategoryGroup( data.getCategoryGroup()); List images = data.getImages(); ImageSummary isg; Iterator i; for (int j = 0; j < imagesDiff.size(); j++) { isg = (ImageSummary) imagesDiff.get(j); i = images.iterator(); while (i.hasNext()) { if (((ImageSummary) i.next()).getID() == isg.getID()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; }
List retrieveImagesDiffInUserDatasetsNotInCategoryGroup(CategoryData data, List datasets) { List imagesDiff = new ArrayList(); try { imagesDiff = retrieveImagesInUserDatasetsNotInCategoryGroup( data.getCategoryGroup()); List images = data.getImages(); ImageSummary isg; Iterator i; for (int j = 0; j < imagesDiff.size(); j++) { isg = (ImageSummary) imagesDiff.get(j); i = images.iterator(); while (i.hasNext()) { if (((ImageSummary) i.next()).getID() == isg.getID()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; }
3,233,912
List retrieveImagesDiffInUserDatasetsNotInCategoryGroup(CategoryData data) { List imagesDiff = new ArrayList(); try { imagesDiff = retrieveImagesInUserDatasetsNotInCategoryGroup( data.getCategoryGroup()); List images = data.getImages(); ImageSummary isg; Iterator i; for (int j = 0; j < imagesDiff.size(); j++) { isg = (ImageSummary) imagesDiff.get(j); i = images.iterator(); while (i.hasNext()) { if (((ImageSummary) i.next()).getID() == isg.getID()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; }
List retrieveImagesDiffInUserDatasetsNotInCategoryGroup(CategoryData data) { List imagesDiff = new ArrayList(); try { imagesDiff = retrieveImagesInUserDatasetsNotInCategoryGroup( data.getCategoryGroup(), datasets); List images = data.getImages(); ImageSummary isg; Iterator i; for (int j = 0; j < imagesDiff.size(); j++) { isg = (ImageSummary) imagesDiff.get(j); i = images.iterator(); while (i.hasNext()) { if (((ImageSummary) i.next()).getID() == isg.getID()) imagesDiff.remove(isg); } } } catch(DSAccessException dsae) { String s = "Can't retrieve user's images."; getRegistry().getLogger().error(this, s+" Error: "+dsae); getRegistry().getUserNotifier().notifyError("Data Retrieval " + "Failure", s, dsae); } return imagesDiff; }
3,233,913
List retrieveImagesInUserDatasetsNotInCategoryGroup(CategoryGroupData group) throws DSAccessException { try { SemanticTypesService sts = registry.getSemanticTypesService(); return sts.retrieveImagesInUserDatasetsNotInCategoryGroup(group); } catch(DSOutOfServiceException dsose) { ServiceActivationRequest request = new ServiceActivationRequest( ServiceActivationRequest.DATA_SERVICES); registry.getEventBus().post(request); } return new ArrayList(); }
List retrieveImagesInUserDatasetsNotInCategoryGroup(CategoryGroupData group, List datasets) throws DSAccessException { try { SemanticTypesService sts = registry.getSemanticTypesService(); return sts.retrieveImagesInUserDatasetsNotInCategoryGroup(group); } catch(DSOutOfServiceException dsose) { ServiceActivationRequest request = new ServiceActivationRequest( ServiceActivationRequest.DATA_SERVICES); registry.getEventBus().post(request); } return new ArrayList(); }
3,233,914
List retrieveImagesInUserDatasetsNotInCategoryGroup(CategoryGroupData group) throws DSAccessException { try { SemanticTypesService sts = registry.getSemanticTypesService(); return sts.retrieveImagesInUserDatasetsNotInCategoryGroup(group); } catch(DSOutOfServiceException dsose) { ServiceActivationRequest request = new ServiceActivationRequest( ServiceActivationRequest.DATA_SERVICES); registry.getEventBus().post(request); } return new ArrayList(); }
List retrieveImagesInUserDatasetsNotInCategoryGroup(CategoryGroupData group) throws DSAccessException { try { SemanticTypesService sts = registry.getSemanticTypesService(); return sts.retrieveImagesInUserDatasetsNotInCategoryGroup(group, ids); } catch(DSOutOfServiceException dsose) { ServiceActivationRequest request = new ServiceActivationRequest( ServiceActivationRequest.DATA_SERVICES); registry.getEventBus().post(request); } return new ArrayList(); }
3,233,915
void viewDataset(int datasetID) { LoadDataset request = new LoadDataset(datasetID); registry.getEventBus().post(request); }
void viewDataset(int datasetID) { LoadDataset request = new LoadDataset(datasetID); registry.getEventBus().post(request); }
3,233,916
public TestRubyBase(String name) { super(name); }
public TestRubyBase(String name) { super(name); }
3,233,917
public IRubyObject const_missing(IRubyObject name) { /* Uninitialized constant */ if (this != getRuntime().getObject()) { throw getRuntime().newNameError("uninitialized constant " + name.asSymbol() + " at " + getName()); } throw getRuntime().newNameError("uninitialized constant " + name.asSymbol()); }
public IRubyObject const_missing(IRubyObject name) { /* Uninitialized constant */ if (this != getRuntime().getObject()) { throw getRuntime().newNameError("uninitialized constant " + getName() + "::" + name.asSymbol()); } throw getRuntime().newNameError("uninitialized constant " + name.asSymbol()); }
3,233,920
public void testInitLoad() { ArrayList list = new ArrayList(); //check without a RubyHome and with one parameter list.add("toto"); ruby.initLoad(list); //check that the global vars are correctly valuated RubyObject lCol = ruby.getGlobalVar("$:"); RubyObject lI = ruby.getGlobalVar("$-I"); RubyObject lLoad = ruby.getGlobalVar("$LOAD_PATH"); assertTrue(lCol == lI && lI == lLoad && lLoad != null); RubyArray lLoadA = (RubyArray)lLoad; //check that we have 2 non null element assertTrue(((RubyFixnum)lLoadA.nitems()).getValue()== 2); //check that it is what we expect, a RubyString of the correct type assertTrue(new RubyString(ruby,"toto").equal(lLoadA.shift())); assertTrue(new RubyString(ruby,".").equal(lLoadA.shift())); //check the case when RubyHome is valuated System.setProperty("org.jruby.HOME", "RubyHome"); //MRI result /*C:\dev\jruby>ruby -e "puts $:"/cygdrive/d/ruby/lib/ruby/site_ruby/1.6/cygdrive/d/ruby/lib/ruby/site_ruby/1.6/i386-cygwin/cygdrive/d/ruby/lib/ruby/site_ruby/cygdrive/d/ruby/lib/ruby/1.6/cygdrive/d/ruby/lib/ruby/1.6/i386-cygwin. */ ruby.initLoad(new ArrayList()); if (File.separatorChar == '/') { assertEquals("6", eval("$:.size")); String wanted = "RubyHome/lib/ruby/site_ruby/1.6" + "RubyHome/lib/ruby/site_ruby/1.6/JAVA" + "RubyHome/lib/ruby/site_ruby" + "RubyHome/lib/ruby/1.6" + "RubyHome/lib/ruby/1.6/JAVA" + ".\n"; assertEquals(wanted, eval("puts $:")); } else { String result = eval("puts $:"); String wanted = "RubyHome\\lib\\ruby\\site_ruby\\1.6" + "RubyHome\\lib\\ruby\\site_ruby\\1.6\\JAVA" + "RubyHome\\lib\\ruby\\site_ruby" + "RubyHome\\lib\\ruby\\1.6" + "RubyHome\\lib\\ruby\\1.6\\JAVA" + "."; assertEquals(wanted, result); } }
public void testInitLoad() { ArrayList list = new ArrayList(); //check without a RubyHome and with one parameter list.add("toto"); ruby.initLoad(list); //check that the global vars are correctly valuated RubyObject lCol = ruby.getGlobalVar("$:"); RubyObject lI = ruby.getGlobalVar("$-I"); RubyObject lLoad = ruby.getGlobalVar("$LOAD_PATH"); assertTrue(lCol == lI && lI == lLoad && lLoad != null); RubyArray lLoadA = (RubyArray)lLoad; //check that we have 2 non null element assertTrue(((RubyFixnum)lLoadA.nitems()).getValue()== 2); //check that it is what we expect, a RubyString of the correct type assertTrue(new RubyString(ruby,"toto").equal(lLoadA.shift())); assertTrue(new RubyString(ruby,".").equal(lLoadA.shift())); //check the case when RubyHome is valuated System.setProperty("org.jruby.HOME", "RubyHome"); //MRI result /*C:\dev\jruby>ruby -e "puts $:"/cygdrive/d/ruby/lib/ruby/site_ruby/1.6/cygdrive/d/ruby/lib/ruby/site_ruby/1.6/i386-cygwin/cygdrive/d/ruby/lib/ruby/site_ruby/cygdrive/d/ruby/lib/ruby/1.6/cygdrive/d/ruby/lib/ruby/1.6/i386-cygwin. */ ruby.initLoad(new ArrayList()); if (File.separatorChar == '/') { assertEquals("6", eval("$:.size")); String wanted = "RubyHome/lib/ruby/site_ruby/1.6" + "RubyHome/lib/ruby/site_ruby/1.6/JAVA" + "RubyHome/lib/ruby/site_ruby" + "RubyHome/lib/ruby/1.6" + "RubyHome/lib/ruby/1.6/JAVA" + ".\n"; assertEquals(wanted, eval("puts $:")); } else { String result = eval("puts $:"); String wanted = "RubyHome\\lib\\ruby\\site_ruby\\1.6" + "RubyHome\\lib\\ruby\\site_ruby\\1.6\\JAVA" + "RubyHome\\lib\\ruby\\site_ruby" + "RubyHome\\lib\\ruby\\1.6" + "RubyHome\\lib\\ruby\\1.6\\JAVA" + "."; assertEquals(wanted, result); } }
3,233,921
private static void initializeRuntime(final Ruby runtime, String filename) { IRubyObject argumentArray = runtime.newArray(JavaUtil.convertJavaArrayToRuby(runtime, commandline.scriptArguments)); runtime.setVerbose(runtime.newBoolean(commandline.verbose)); defineGlobalKCODE(runtime); defineGlobalVERBOSE(runtime); runtime.getClasses().getObjectClass().setConstant("$VERBOSE", commandline.verbose ? runtime.getTrue() : runtime.getNil()); runtime.defineGlobalConstant("ARGV", argumentArray); // I guess ENV is not a hash, but should support a to_hash, though // it supposedly supports methods of a Hash? Also, I think that // RubyGlobal may need to create an empty ENV var in the case that // the runtime is not initialized by Main. Properties envs = new Properties(); runtime.defineGlobalConstant("ENV", RubyHash.newHash(runtime, envs, null)); defineGlobal(runtime, "$-p", commandline.assumePrinting); defineGlobal(runtime, "$-n", commandline.assumeLoop); defineGlobal(runtime, "$-a", commandline.sDoSplit); defineGlobal(runtime, "$-l", commandline.processLineEnds); runtime.getGlobalVariables().defineReadonly("$*", new ValueAccessor(argumentArray)); // TODO this is a fake cause we have no real process number in Java runtime.getGlobalVariables().defineReadonly("$$", new ValueAccessor(runtime.newFixnum(runtime.hashCode()))); runtime.defineVariable(new RubyGlobal.StringGlobalVariable(runtime, "$0", runtime.newString(filename))); runtime.getLoadService().init(commandline.loadPaths()); Iterator iter = commandline.requiredLibraries().iterator(); while (iter.hasNext()) { String scriptName = (String) iter.next(); RubyKernel.require(runtime.getTopSelf(), runtime.newString(scriptName)); } }
private static void initializeRuntime(final Ruby runtime, String filename) { IRubyObject argumentArray = runtime.newArray(JavaUtil.convertJavaArrayToRuby(runtime, commandline.scriptArguments)); runtime.setVerbose(runtime.newBoolean(commandline.verbose)); defineGlobalVERBOSE(runtime); runtime.getClasses().getObjectClass().setConstant("$VERBOSE", commandline.verbose ? runtime.getTrue() : runtime.getNil()); runtime.defineGlobalConstant("ARGV", argumentArray); // I guess ENV is not a hash, but should support a to_hash, though // it supposedly supports methods of a Hash? Also, I think that // RubyGlobal may need to create an empty ENV var in the case that // the runtime is not initialized by Main. Properties envs = new Properties(); runtime.defineGlobalConstant("ENV", RubyHash.newHash(runtime, envs, null)); defineGlobal(runtime, "$-p", commandline.assumePrinting); defineGlobal(runtime, "$-n", commandline.assumeLoop); defineGlobal(runtime, "$-a", commandline.sDoSplit); defineGlobal(runtime, "$-l", commandline.processLineEnds); runtime.getGlobalVariables().defineReadonly("$*", new ValueAccessor(argumentArray)); // TODO this is a fake cause we have no real process number in Java runtime.getGlobalVariables().defineReadonly("$$", new ValueAccessor(runtime.newFixnum(runtime.hashCode()))); runtime.defineVariable(new RubyGlobal.StringGlobalVariable(runtime, "$0", runtime.newString(filename))); runtime.getLoadService().init(commandline.loadPaths()); Iterator iter = commandline.requiredLibraries().iterator(); while (iter.hasNext()) { String scriptName = (String) iter.next(); RubyKernel.require(runtime.getTopSelf(), runtime.newString(scriptName)); } }
3,233,922
public void initialize(BSFManager mgr, String lang, Vector declaredBeans) throws BSFException { super.initialize(mgr, lang, declaredBeans); ruby = new Ruby(); try { ruby.setRegexpAdapterClass(Class.forName("org.jruby.regexp.GNURegexpAdapter")); } catch (Exception e) { throw new RuntimeException("Class GNURegexpAdapter not found"); } ruby.init(); topSelf = ruby.getRubyTopSelf(); int size = declaredBeans.size(); for (int i = 0; i < size; i++) { BSFDeclaredBean bean = (BSFDeclaredBean)declaredBeans.elementAt(i); topSelf.getSingletonClass().defineMethod(bean.name, new DeclaredBeanGetMethod(bean)); topSelf.getSingletonClass().defineMethod(bean.name + "=", new DeclaredBeanSetMethod(bean)); } }
public void initialize(BSFManager mgr, String lang, Vector declaredBeans) throws BSFException { super.initialize(mgr, lang, declaredBeans); ruby = new Ruby(); try { ruby.setRegexpAdapterClass(Class.forName("org.jruby.regexp.GNURegexpAdapter")); } catch (Exception e) { throw new RuntimeException("Class GNURegexpAdapter not found"); } ruby.init(); topSelf = ruby.getRubyTopSelf(); int size = declaredBeans.size(); for (int i = 0; i < size; i++) { BSFDeclaredBean bean = (BSFDeclaredBean)declaredBeans.elementAt(i); topSelf.getSingletonClass().defineMethod(bean.name, new DeclaredBeanGetMethod(bean)); topSelf.getSingletonClass().defineMethod(bean.name + "=", new DeclaredBeanSetMethod(bean)); } }
3,233,923
public DeclaredBeanGetMethod(BSFDeclaredBean bean) { this.bean = bean; }
public DeclaredBeanGetMethod(BSFDeclaredBean bean) { this.bean = bean; }
3,233,924
public void actionPerformed(ActionEvent e) { String username = regPanel.getScreenName(); String password = regPanel.getPassword(); if (!ModelUtil.hasLength(username) || !ModelUtil.hasLength(password)) { JOptionPane.showMessageDialog(mainPanel, "Username and/or Password need to be supplied.", "Registration Error", JOptionPane.ERROR_MESSAGE); return; } try { registerUser(con, serviceName, username, password); // Send updated presence. } catch (XMPPException e1) { JOptionPane.showMessageDialog(mainPanel, "Unable to register with Transport.", "Registration Error", JOptionPane.ERROR_MESSAGE); } dialog.dispose(); }
public void actionPerformed(ActionEvent e) { String username = regPanel.getScreenName(); String password = regPanel.getPassword(); if (!ModelUtil.hasLength(username) || !ModelUtil.hasLength(password)) { JOptionPane.showMessageDialog(mainPanel, "Username and/or Password need to be supplied.", "Registration Error", JOptionPane.ERROR_MESSAGE); return; } try { registerUser(con, serviceName, username, password); // Send updated presence. } catch (XMPPException e1) { JOptionPane.showMessageDialog(mainPanel, "Unable to register with Transport.", "Registration Error", JOptionPane.ERROR_MESSAGE); } dialog.dispose(); }
3,233,925
public TransportRegistrationPanel(String serviceName) { setLayout(new GridBagLayout()); final Transport transport = TransportManager.getTransport(serviceName); titlePanel = new TitlePanel("AIM Registration", transport.getTitle(), transport.getIcon(), true); add(titlePanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); final JLabel usernameLabel = new JLabel(); usernameLabel.setFont(new Font("Dialog", Font.BOLD, 11)); ResourceUtils.resLabel(usernameLabel, usernameField, "&Username:"); add(usernameLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(usernameField, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); final JLabel passwordLabel = new JLabel(); passwordLabel.setFont(new Font("Dialog", Font.BOLD, 11)); ResourceUtils.resLabel(passwordLabel, passwordField, "&Password:"); add(passwordLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(passwordField, new GridBagConstraints(1, 2, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); }
public TransportRegistrationPanel(String serviceName) { setLayout(new GridBagLayout()); final Transport transport = TransportManager.getTransport(serviceName); titlePanel = new TitlePanel(transport.getTitle(), transport.getInstructions(), transport.getIcon(), true); add(titlePanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); final JLabel usernameLabel = new JLabel(); usernameLabel.setFont(new Font("Dialog", Font.BOLD, 11)); ResourceUtils.resLabel(usernameLabel, usernameField, "&Username:"); add(usernameLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(usernameField, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); final JLabel passwordLabel = new JLabel(); passwordLabel.setFont(new Font("Dialog", Font.BOLD, 11)); ResourceUtils.resLabel(passwordLabel, passwordField, "&Password:"); add(passwordLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(passwordField, new GridBagConstraints(1, 2, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); }
3,233,926
public RubyObject get() { return JavaUtil.convertJavaToRuby(ruby, bean.bean); }
public RubyObject get() { return JavaUtil.convertJavaToRuby(this.ruby, bean.bean); }
3,233,927
public RubyObject set(RubyObject value) { bean.bean = JavaUtil.convertRubyToJava(ruby, value, bean.type); return value; }
public RubyObject set(RubyObject value) { bean.bean = JavaUtil.convertRubyToJava(this.ruby, value, bean.type); return value; }
3,233,928
public final Object evaluate(Context context) { // do nothing try { if (myValue instanceof Macro) { myVariable.setValue(context, ((Macro) myValue).evaluate(context)); } else { myVariable.setValue(context, myValue); } } catch (PropertyException e) { context.getLog("engine").warning("Set: Unable to set value: " + myVariable); return ("<!--\n Unable to set value: " + myVariable + " \n-->"); } return null; }
publicfinalObjectevaluate(Contextcontext){//donothingtry{if(myValueinstanceofMacro){myVariable.setValue(context,((Macro)myValue).evaluate(context));}else{myVariable.setValue(context,myValue);}}catch(PropertyExceptione){context.getLog("engine").warning("Set:Unabletosetvalue:"+myVariable);return("<!--\nUnabletosetvalue:"+myVariable+"\n-->");}returnnull;}
3,233,929
public void propertyChange(PropertyChangeEvent pce) { String propName = pce.getPropertyName(); if (ImViewer.Z_SELECTED_PROPERTY.equals(propName)) { view.setZSection(((Integer) pce.getNewValue()).intValue()); } else if (ImViewer.T_SELECTED_PROPERTY.equals(propName)) { view.setTimepoint(((Integer) pce.getNewValue()).intValue()); } else if (ChannelButton.CHANNEL_SELECTED_PROPERTY.equals(propName)) { Map map = (Map) pce.getNewValue(); if (map == null) return; if (map.size() != 1) return; Iterator i = map.keySet().iterator(); Integer index; while (i.hasNext()) { index = (Integer) i.next(); model.setChannelSelection(index.intValue(), ((Boolean) map.get(index)).booleanValue()); } } else if (ZoomAction.ZOOM_PROPERTY.equals(propName)) { view.setZoomFactor((ViewerAction) pce.getNewValue()); } else if (RateImageAction.RATE_IMAGE_PROPERTY.equals(propName)) { view.setRatingFactor((ViewerAction) pce.getNewValue()); } else if (LoadingWindow.CLOSED_PROPERTY.equals(propName)) { model.discard(); } else if (Renderer.RENDER_PLANE_PROPERTY.equals(propName)) { model.renderXYPlane(); } else if (Renderer.SELECTED_CHANNEL_PROPERTY.equals(propName)) { if (model.getColorModel().equals(ImViewer.GREY_SCALE_MODEL)) { int c = ((Integer) pce.getNewValue()).intValue(); for (int i = 0; i < model.getMaxC(); i++) model.setChannelActive(i, i == c); model.displayChannelMovie(); } } else if (ChannelButton.INFO_PROPERTY.equals(propName)) { int index = ((Integer) pce.getNewValue()).intValue(); ChannelMetadata data = model.getChannelMetadata(index); if (data != null) { InfoDialog dialog = new InfoDialog(model.getUI(), data); dialog.addPropertyChangeListener(this); UIUtilities.setLocationRelativeToAndShow(view, dialog); } else { UserNotifier un = ImViewerAgent.getRegistry().getUserNotifier(); un.notifyInfo("Channel info", "No metadata for the " + "selected channel."); } } else if (ChannelButton.CHANNEL_COLOR_PROPERTY.equals(propName) || ChannelColorMenuItem.CHANNEL_COLOR_PROPERTY.equals(propName)) { colorPickerIndex = ((Integer) pce.getNewValue()).intValue(); Color c = model.getChannelColor(colorPickerIndex); ColourPicker dialog = new ColourPicker(view, c); dialog.addPropertyChangeListener(this); UIUtilities.setLocationRelativeToAndShow(view, dialog); } else if (ColourPicker.COLOUR_PROPERTY.equals(propName)) { Color c = (Color) pce.getNewValue(); if (colorPickerIndex != -1) { model.setChannelColor(colorPickerIndex, c); } } else if (UnitBarSizeDialog.UNIT_BAR_VALUE_PROPERTY.equals(propName)) { double v = ((Double) pce.getNewValue()).doubleValue(); model.setUnitBarSize(v); } else if (InfoDialog.UPDATE_PROPERTY.equals(propName)) { //TODO: implement method } else if (ImViewer.ICONIFIED_PROPERTY.equals(propName)) { view.onIconified(); if (timer != null) timer.stop(); } }
public void propertyChange(PropertyChangeEvent pce) { String propName = pce.getPropertyName(); if (ImViewer.Z_SELECTED_PROPERTY.equals(propName)) { view.setZSection(((Integer) pce.getNewValue()).intValue()); } else if (ImViewer.T_SELECTED_PROPERTY.equals(propName)) { view.setTimepoint(((Integer) pce.getNewValue()).intValue()); } else if (ChannelButton.CHANNEL_SELECTED_PROPERTY.equals(propName)) { Map map = (Map) pce.getNewValue(); if (map == null) return; if (map.size() != 1) return; Iterator i = map.keySet().iterator(); Integer index; while (i.hasNext()) { index = (Integer) i.next(); model.setChannelSelection(index.intValue(), ((Boolean) map.get(index)).booleanValue()); } } else if (ZoomAction.ZOOM_PROPERTY.equals(propName)) { view.setZoomFactor((ViewerAction) pce.getNewValue()); } else if (RateImageAction.RATE_IMAGE_PROPERTY.equals(propName)) { view.setRatingFactor((ViewerAction) pce.getNewValue()); } else if (LoadingWindow.CLOSED_PROPERTY.equals(propName)) { model.discard(); } else if (Renderer.RENDER_PLANE_PROPERTY.equals(propName)) { model.renderXYPlane(); } else if (Renderer.SELECTED_CHANNEL_PROPERTY.equals(propName)) { if (model.getColorModel().equals(ImViewer.GREY_SCALE_MODEL)) { int c = ((Integer) pce.getNewValue()).intValue(); for (int i = 0; i < model.getMaxC(); i++) model.setChannelActive(i, i == c); model.displayChannelMovie(); } } else if (ChannelButton.INFO_PROPERTY.equals(propName)) { int index = ((Integer) pce.getNewValue()).intValue(); ChannelMetadata data = model.getChannelMetadata(index); if (data != null) { InfoDialog dialog = new InfoDialog(model.getUI(), data); dialog.addPropertyChangeListener(this); UIUtilities.setLocationRelativeToAndShow(view, dialog); } else { UserNotifier un = ImViewerAgent.getRegistry().getUserNotifier(); un.notifyInfo("Channel info", "No metadata for the " + "selected channel."); } } else if (ChannelButton.CHANNEL_COLOR_PROPERTY.equals(propName) || ChannelColorMenuItem.CHANNEL_COLOR_PROPERTY.equals(propName)) { colorPickerIndex = ((Integer) pce.getNewValue()).intValue(); Color c = model.getChannelColor(colorPickerIndex); ColourPicker dialog = new ColourPicker(view, c); dialog.addPropertyChangeListener(this); UIUtilities.setLocationRelativeToAndShow(view, dialog); } else if (ColourPicker.COLOUR_PROPERTY.equals(propName)) { Color c = (Color) pce.getNewValue(); if (colorPickerIndex != -1) { model.setChannelColor(colorPickerIndex, c); } } else if (UnitBarSizeDialog.UNIT_BAR_VALUE_PROPERTY.equals(propName)) { double v = ((Double) pce.getNewValue()).doubleValue(); model.setUnitBarSize(v); } else if (InfoDialog.UPDATE_PROPERTY.equals(propName)) { //TODO: implement method } else if (ImViewer.ICONIFIED_PROPERTY.equals(propName)) { view.onIconified(); } }
3,233,930
public void stateChanged(ChangeEvent e) { int state = model.getState(); switch (state) { case ImViewer.DISCARDED: LoadingWindow window = view.getLoadingWindow(); window.setVisible(false); window.dispose(); view.setVisible(false); view.dispose(); if (view.isLensVisible()) view.setLensVisible(false); historyState = state; break; case ImViewer.LOADING_RENDERING_CONTROL: UIUtilities.centerAndShow(view.getLoadingWindow()); historyState = state; break; case ImViewer.LOADING_IMAGE: //if (historyState == ImViewer.LOADING_METADATA) if (historyState == ImViewer.LOADING_RENDERING_CONTROL) view.getLoadingWindow().setVisible(false); view.onStateChange(false); historyState = state; break; case ImViewer.READY: view.getLoadingWindow().setVisible(false); if (historyState == ImViewer.CHANNEL_MOVIE) view.onStateChange(false); else { view.onStateChange(true); historyState = state; } timer.stop(); timer.start(); break; case ImViewer.CHANNEL_MOVIE: historyState = ImViewer.CHANNEL_MOVIE; view.onStateChange(false); } //historyState = state; }
public void stateChanged(ChangeEvent e) { int state = model.getState(); switch (state) { case ImViewer.DISCARDED: LoadingWindow window = view.getLoadingWindow(); window.setVisible(false); window.dispose(); view.setVisible(false); view.dispose(); if (view.isLensVisible()) view.setLensVisible(false); historyState = state; break; case ImViewer.LOADING_RENDERING_CONTROL: UIUtilities.centerAndShow(view.getLoadingWindow()); historyState = state; break; case ImViewer.LOADING_IMAGE: //if (historyState == ImViewer.LOADING_METADATA) if (historyState == ImViewer.LOADING_RENDERING_CONTROL) view.getLoadingWindow().setVisible(false); view.onStateChange(false); historyState = state; break; case ImViewer.READY: view.getLoadingWindow().setVisible(false); if (historyState == ImViewer.CHANNEL_MOVIE) view.onStateChange(false); else { view.onStateChange(true); historyState = state; } timer.stop(); timer.start(); break; case ImViewer.CHANNEL_MOVIE: historyState = ImViewer.CHANNEL_MOVIE; view.onStateChange(false); } //historyState = state; }
3,233,931
public void stateChanged(ChangeEvent e) { int state = model.getState(); switch (state) { case ImViewer.DISCARDED: LoadingWindow window = view.getLoadingWindow(); window.setVisible(false); window.dispose(); view.setVisible(false); view.dispose(); if (view.isLensVisible()) view.setLensVisible(false); historyState = state; break; case ImViewer.LOADING_RENDERING_CONTROL: UIUtilities.centerAndShow(view.getLoadingWindow()); historyState = state; break; case ImViewer.LOADING_IMAGE: //if (historyState == ImViewer.LOADING_METADATA) if (historyState == ImViewer.LOADING_RENDERING_CONTROL) view.getLoadingWindow().setVisible(false); view.onStateChange(false); historyState = state; break; case ImViewer.READY: view.getLoadingWindow().setVisible(false); if (historyState == ImViewer.CHANNEL_MOVIE) view.onStateChange(false); else { view.onStateChange(true); historyState = state; } timer.stop(); timer.start(); break; case ImViewer.CHANNEL_MOVIE: historyState = ImViewer.CHANNEL_MOVIE; view.onStateChange(false); } //historyState = state; }
publicvoidstateChanged(ChangeEvente){intstate=model.getState();switch(state){caseImViewer.DISCARDED:LoadingWindowwindow=view.getLoadingWindow();window.setVisible(false);window.dispose();view.setVisible(false);view.dispose();if(view.isLensVisible()) view.setLensVisible(false);historyState=state;break;caseImViewer.LOADING_RENDERING_CONTROL:UIUtilities.centerAndShow(view.getLoadingWindow());historyState=state;break;caseImViewer.LOADING_IMAGE://if(historyState==ImViewer.LOADING_METADATA)if(historyState==ImViewer.LOADING_RENDERING_CONTROL)view.getLoadingWindow().setVisible(false);view.onStateChange(false);historyState=state;break;caseImViewer.READY:view.getLoadingWindow().setVisible(false);if(historyState==ImViewer.CHANNEL_MOVIE)view.onStateChange(false);else{view.onStateChange(true);historyState=state;}timer.stop();timer.start();break;caseImViewer.CHANNEL_MOVIE:historyState=ImViewer.CHANNEL_MOVIE;view.onStateChange(false);}//historyState=state;}
3,233,932
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case FixnumDefinition.TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,933
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case FixnumDefinition.TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,934
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case FixnumDefinition.OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,935
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case FixnumDefinition.OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,936
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case FixnumDefinition.OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,937
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case FixnumDefinition.OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,938
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case FixnumDefinition.OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,939
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case FixnumDefinition.OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,940
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case FixnumDefinition.OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,941
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case FixnumDefinition.OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,942
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case FixnumDefinition.EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,943
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case FixnumDefinition.OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,944
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case FixnumDefinition.OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,945
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case FixnumDefinition.OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,946
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case FixnumDefinition.OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,947
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case FixnumDefinition.OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,948
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case FixnumDefinition.OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,949
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case FixnumDefinition.SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,950
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case FixnumDefinition.HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,951
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case FixnumDefinition.ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,952
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case FixnumDefinition.INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
3,233,953
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case M_ID: return id(); } return super.callIndexed(index, args); }
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case M_TO_F: return to_f(); case M_TO_S: return to_s(); case M_OP_LSHIFT: return op_lshift(args[0]); case M_OP_RSHIFT: return op_rshift(args[0]); case M_OP_PLUS: return op_plus(args[0]); case M_OP_MINUS: return op_minus(args[0]); case M_OP_MUL: return op_mul(args[0]); case M_OP_DIV: return op_div(args[0]); case M_OP_MOD: return op_mod(args[0]); case M_OP_POW: return op_pow(args[0]); case M_EQUAL: return equal(args[0]); case M_OP_CMP: return op_cmp(args[0]); case M_OP_GT: return op_gt(args[0]); case M_OP_GE: return op_ge(args[0]); case M_OP_LT: return op_lt(args[0]); case M_OP_LE: return op_le(args[0]); case M_OP_AND: return op_and(args[0]); case M_SIZE: return size(); case M_HASH: return hash(); case M_ID2NAME: return id2name(); case M_INVERT: return invert(); case FixnumDefinition.ID: return id(); } return super.callIndexed(index, args); }
3,233,954
public static RubyClass createFixnumClass(Ruby ruby) { RubyClass fixnumClass = ruby.defineClass("Fixnum", ruby.getClasses().getIntegerClass()); fixnumClass.includeModule(ruby.getClasses().getPrecisionModule()); fixnumClass.defineSingletonMethod("induced_from", CallbackFactory.getSingletonMethod(RubyFixnum.class, "induced_from", IRubyObject.class)); fixnumClass.defineMethod("to_f", IndexedCallback.create(M_TO_F, 0)); fixnumClass.defineMethod("to_s", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("to_str", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("taint", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("freeze", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("<<", IndexedCallback.create(M_OP_LSHIFT, 1)); fixnumClass.defineMethod(">>", IndexedCallback.create(M_OP_RSHIFT, 1)); fixnumClass.defineMethod("+", IndexedCallback.create(M_OP_PLUS, 1)); fixnumClass.defineMethod("-", IndexedCallback.create(M_OP_MINUS, 1)); fixnumClass.defineMethod("*", IndexedCallback.create(M_OP_MUL, 1)); fixnumClass.defineMethod("/", IndexedCallback.create(M_OP_DIV, 1)); fixnumClass.defineMethod("%", IndexedCallback.create(M_OP_MOD, 1)); fixnumClass.defineMethod("**", IndexedCallback.create(M_OP_POW, 1)); fixnumClass.defineMethod("==", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("eql?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("equal?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("<=>", IndexedCallback.create(M_OP_CMP, 1)); fixnumClass.defineMethod(">", IndexedCallback.create(M_OP_GT, 1)); fixnumClass.defineMethod(">=", IndexedCallback.create(M_OP_GE, 1)); fixnumClass.defineMethod("<", IndexedCallback.create(M_OP_LT, 1)); fixnumClass.defineMethod("<=", IndexedCallback.create(M_OP_LE, 1)); fixnumClass.defineMethod("&", IndexedCallback.create(M_OP_AND, 1)); fixnumClass.defineMethod("|", CallbackFactory.getMethod(RubyFixnum.class, "op_or", RubyInteger.class)); fixnumClass.defineMethod("^", CallbackFactory.getMethod(RubyFixnum.class, "op_xor", RubyInteger.class)); fixnumClass.defineMethod("size", IndexedCallback.create(M_SIZE, 0)); fixnumClass.defineMethod("[]", CallbackFactory.getMethod(RubyFixnum.class, "aref", RubyInteger.class)); fixnumClass.defineMethod("hash", IndexedCallback.create(M_HASH, 0)); fixnumClass.defineMethod("id2name", IndexedCallback.create(M_ID2NAME, 0)); fixnumClass.defineMethod("~", IndexedCallback.create(M_INVERT, 0)); fixnumClass.defineMethod("id", IndexedCallback.create(M_ID, 0)); return fixnumClass; }
public static RubyClass createFixnumClass(Ruby ruby) { RubyClass fixnumClass = ruby.defineClass("Fixnum", ruby.getClasses().getIntegerClass()); fixnumClass.includeModule(ruby.getClasses().getPrecisionModule()); fixnumClass.defineSingletonMethod("induced_from", CallbackFactory.getSingletonMethod(RubyFixnum.class, "induced_from", IRubyObject.class)); fixnumClass.defineMethod("to_f", IndexedCallback.create(M_TO_F, 0)); fixnumClass.defineMethod("to_s", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("to_str", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("taint", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("freeze", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("<<", IndexedCallback.create(M_OP_LSHIFT, 1)); fixnumClass.defineMethod(">>", IndexedCallback.create(M_OP_RSHIFT, 1)); fixnumClass.defineMethod("+", IndexedCallback.create(M_OP_PLUS, 1)); fixnumClass.defineMethod("-", IndexedCallback.create(M_OP_MINUS, 1)); fixnumClass.defineMethod("*", IndexedCallback.create(M_OP_MUL, 1)); fixnumClass.defineMethod("/", IndexedCallback.create(M_OP_DIV, 1)); fixnumClass.defineMethod("%", IndexedCallback.create(M_OP_MOD, 1)); fixnumClass.defineMethod("**", IndexedCallback.create(M_OP_POW, 1)); fixnumClass.defineMethod("==", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("eql?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("equal?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("<=>", IndexedCallback.create(M_OP_CMP, 1)); fixnumClass.defineMethod(">", IndexedCallback.create(M_OP_GT, 1)); fixnumClass.defineMethod(">=", IndexedCallback.create(M_OP_GE, 1)); fixnumClass.defineMethod("<", IndexedCallback.create(M_OP_LT, 1)); fixnumClass.defineMethod("<=", IndexedCallback.create(M_OP_LE, 1)); fixnumClass.defineMethod("&", IndexedCallback.create(M_OP_AND, 1)); fixnumClass.defineMethod("|", CallbackFactory.getMethod(RubyFixnum.class, "op_or", RubyInteger.class)); fixnumClass.defineMethod("^", CallbackFactory.getMethod(RubyFixnum.class, "op_xor", RubyInteger.class)); fixnumClass.defineMethod("size", IndexedCallback.create(M_SIZE, 0)); fixnumClass.defineMethod("[]", CallbackFactory.getMethod(RubyFixnum.class, "aref", RubyInteger.class)); fixnumClass.defineMethod("hash", IndexedCallback.create(M_HASH, 0)); fixnumClass.defineMethod("id2name", IndexedCallback.create(M_ID2NAME, 0)); fixnumClass.defineMethod("~", IndexedCallback.create(M_INVERT, 0)); fixnumClass.defineMethod("id", IndexedCallback.create(M_ID, 0)); return fixnumClass; }
3,233,956
public static RubyClass createFixnumClass(Ruby ruby) { RubyClass fixnumClass = ruby.defineClass("Fixnum", ruby.getClasses().getIntegerClass()); fixnumClass.includeModule(ruby.getClasses().getPrecisionModule()); fixnumClass.defineSingletonMethod("induced_from", CallbackFactory.getSingletonMethod(RubyFixnum.class, "induced_from", IRubyObject.class)); fixnumClass.defineMethod("to_f", IndexedCallback.create(M_TO_F, 0)); fixnumClass.defineMethod("to_s", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("to_str", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("taint", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("freeze", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("<<", IndexedCallback.create(M_OP_LSHIFT, 1)); fixnumClass.defineMethod(">>", IndexedCallback.create(M_OP_RSHIFT, 1)); fixnumClass.defineMethod("+", IndexedCallback.create(M_OP_PLUS, 1)); fixnumClass.defineMethod("-", IndexedCallback.create(M_OP_MINUS, 1)); fixnumClass.defineMethod("*", IndexedCallback.create(M_OP_MUL, 1)); fixnumClass.defineMethod("/", IndexedCallback.create(M_OP_DIV, 1)); fixnumClass.defineMethod("%", IndexedCallback.create(M_OP_MOD, 1)); fixnumClass.defineMethod("**", IndexedCallback.create(M_OP_POW, 1)); fixnumClass.defineMethod("==", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("eql?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("equal?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("<=>", IndexedCallback.create(M_OP_CMP, 1)); fixnumClass.defineMethod(">", IndexedCallback.create(M_OP_GT, 1)); fixnumClass.defineMethod(">=", IndexedCallback.create(M_OP_GE, 1)); fixnumClass.defineMethod("<", IndexedCallback.create(M_OP_LT, 1)); fixnumClass.defineMethod("<=", IndexedCallback.create(M_OP_LE, 1)); fixnumClass.defineMethod("&", IndexedCallback.create(M_OP_AND, 1)); fixnumClass.defineMethod("|", CallbackFactory.getMethod(RubyFixnum.class, "op_or", RubyInteger.class)); fixnumClass.defineMethod("^", CallbackFactory.getMethod(RubyFixnum.class, "op_xor", RubyInteger.class)); fixnumClass.defineMethod("size", IndexedCallback.create(M_SIZE, 0)); fixnumClass.defineMethod("[]", CallbackFactory.getMethod(RubyFixnum.class, "aref", RubyInteger.class)); fixnumClass.defineMethod("hash", IndexedCallback.create(M_HASH, 0)); fixnumClass.defineMethod("id2name", IndexedCallback.create(M_ID2NAME, 0)); fixnumClass.defineMethod("~", IndexedCallback.create(M_INVERT, 0)); fixnumClass.defineMethod("id", IndexedCallback.create(M_ID, 0)); return fixnumClass; }
public static RubyClass createFixnumClass(Ruby ruby) { RubyClass fixnumClass = ruby.defineClass("Fixnum", ruby.getClasses().getIntegerClass()); fixnumClass.includeModule(ruby.getClasses().getPrecisionModule()); fixnumClass.includeModule(runtime.getClasses().getPrecisionModule()); fixnumClass.defineMethod("to_f", IndexedCallback.create(M_TO_F, 0)); fixnumClass.defineMethod("to_s", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("to_str", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("taint", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("freeze", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("<<", IndexedCallback.create(M_OP_LSHIFT, 1)); fixnumClass.defineMethod(">>", IndexedCallback.create(M_OP_RSHIFT, 1)); fixnumClass.defineMethod("+", IndexedCallback.create(M_OP_PLUS, 1)); fixnumClass.defineMethod("-", IndexedCallback.create(M_OP_MINUS, 1)); fixnumClass.defineMethod("*", IndexedCallback.create(M_OP_MUL, 1)); fixnumClass.defineMethod("/", IndexedCallback.create(M_OP_DIV, 1)); fixnumClass.defineMethod("%", IndexedCallback.create(M_OP_MOD, 1)); fixnumClass.defineMethod("**", IndexedCallback.create(M_OP_POW, 1)); fixnumClass.defineMethod("==", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("eql?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("equal?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("<=>", IndexedCallback.create(M_OP_CMP, 1)); fixnumClass.defineMethod(">", IndexedCallback.create(M_OP_GT, 1)); fixnumClass.defineMethod(">=", IndexedCallback.create(M_OP_GE, 1)); fixnumClass.defineMethod("<", IndexedCallback.create(M_OP_LT, 1)); fixnumClass.defineMethod("<=", IndexedCallback.create(M_OP_LE, 1)); fixnumClass.defineMethod("&", IndexedCallback.create(M_OP_AND, 1)); fixnumClass.defineMethod("|", CallbackFactory.getMethod(RubyFixnum.class, "op_or", RubyInteger.class)); fixnumClass.defineMethod("^", CallbackFactory.getMethod(RubyFixnum.class, "op_xor", RubyInteger.class)); fixnumClass.defineMethod("size", IndexedCallback.create(M_SIZE, 0)); fixnumClass.defineMethod("[]", CallbackFactory.getMethod(RubyFixnum.class, "aref", RubyInteger.class)); fixnumClass.defineMethod("hash", IndexedCallback.create(M_HASH, 0)); fixnumClass.defineMethod("id2name", IndexedCallback.create(M_ID2NAME, 0)); fixnumClass.defineMethod("~", IndexedCallback.create(M_INVERT, 0)); fixnumClass.defineMethod("id", IndexedCallback.create(M_ID, 0)); return fixnumClass; }
3,233,957
public static RubyClass createFixnumClass(Ruby ruby) { RubyClass fixnumClass = ruby.defineClass("Fixnum", ruby.getClasses().getIntegerClass()); fixnumClass.includeModule(ruby.getClasses().getPrecisionModule()); fixnumClass.defineSingletonMethod("induced_from", CallbackFactory.getSingletonMethod(RubyFixnum.class, "induced_from", IRubyObject.class)); fixnumClass.defineMethod("to_f", IndexedCallback.create(M_TO_F, 0)); fixnumClass.defineMethod("to_s", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("to_str", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("taint", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("freeze", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("<<", IndexedCallback.create(M_OP_LSHIFT, 1)); fixnumClass.defineMethod(">>", IndexedCallback.create(M_OP_RSHIFT, 1)); fixnumClass.defineMethod("+", IndexedCallback.create(M_OP_PLUS, 1)); fixnumClass.defineMethod("-", IndexedCallback.create(M_OP_MINUS, 1)); fixnumClass.defineMethod("*", IndexedCallback.create(M_OP_MUL, 1)); fixnumClass.defineMethod("/", IndexedCallback.create(M_OP_DIV, 1)); fixnumClass.defineMethod("%", IndexedCallback.create(M_OP_MOD, 1)); fixnumClass.defineMethod("**", IndexedCallback.create(M_OP_POW, 1)); fixnumClass.defineMethod("==", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("eql?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("equal?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("<=>", IndexedCallback.create(M_OP_CMP, 1)); fixnumClass.defineMethod(">", IndexedCallback.create(M_OP_GT, 1)); fixnumClass.defineMethod(">=", IndexedCallback.create(M_OP_GE, 1)); fixnumClass.defineMethod("<", IndexedCallback.create(M_OP_LT, 1)); fixnumClass.defineMethod("<=", IndexedCallback.create(M_OP_LE, 1)); fixnumClass.defineMethod("&", IndexedCallback.create(M_OP_AND, 1)); fixnumClass.defineMethod("|", CallbackFactory.getMethod(RubyFixnum.class, "op_or", RubyInteger.class)); fixnumClass.defineMethod("^", CallbackFactory.getMethod(RubyFixnum.class, "op_xor", RubyInteger.class)); fixnumClass.defineMethod("size", IndexedCallback.create(M_SIZE, 0)); fixnumClass.defineMethod("[]", CallbackFactory.getMethod(RubyFixnum.class, "aref", RubyInteger.class)); fixnumClass.defineMethod("hash", IndexedCallback.create(M_HASH, 0)); fixnumClass.defineMethod("id2name", IndexedCallback.create(M_ID2NAME, 0)); fixnumClass.defineMethod("~", IndexedCallback.create(M_INVERT, 0)); fixnumClass.defineMethod("id", IndexedCallback.create(M_ID, 0)); return fixnumClass; }
public static RubyClass createFixnumClass(Ruby ruby) { RubyClass fixnumClass = ruby.defineClass("Fixnum", ruby.getClasses().getIntegerClass()); fixnumClass.includeModule(ruby.getClasses().getPrecisionModule()); fixnumClass.defineSingletonMethod("induced_from", CallbackFactory.getSingletonMethod(RubyFixnum.class, "induced_from", IRubyObject.class)); fixnumClass.defineMethod("to_f", IndexedCallback.create(M_TO_F, 0)); fixnumClass.defineMethod("to_s", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("to_str", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("taint", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("freeze", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("<<", IndexedCallback.create(M_OP_LSHIFT, 1)); fixnumClass.defineMethod(">>", IndexedCallback.create(M_OP_RSHIFT, 1)); fixnumClass.defineMethod("+", IndexedCallback.create(M_OP_PLUS, 1)); fixnumClass.defineMethod("-", IndexedCallback.create(M_OP_MINUS, 1)); fixnumClass.defineMethod("*", IndexedCallback.create(M_OP_MUL, 1)); fixnumClass.defineMethod("/", IndexedCallback.create(M_OP_DIV, 1)); fixnumClass.defineMethod("%", IndexedCallback.create(M_OP_MOD, 1)); fixnumClass.defineMethod("**", IndexedCallback.create(M_OP_POW, 1)); fixnumClass.defineMethod("==", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("eql?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("equal?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("<=>", IndexedCallback.create(M_OP_CMP, 1)); fixnumClass.defineMethod(">", IndexedCallback.create(M_OP_GT, 1)); fixnumClass.defineMethod(">=", IndexedCallback.create(M_OP_GE, 1)); fixnumClass.defineMethod("<", IndexedCallback.create(M_OP_LT, 1)); fixnumClass.defineMethod("<=", IndexedCallback.create(M_OP_LE, 1)); fixnumClass.defineMethod("&", IndexedCallback.create(M_OP_AND, 1)); fixnumClass.defineMethod("|", CallbackFactory.getMethod(RubyFixnum.class, "op_or", RubyInteger.class)); fixnumClass.defineMethod("^", CallbackFactory.getMethod(RubyFixnum.class, "op_xor", RubyInteger.class)); fixnumClass.defineMethod("size", IndexedCallback.create(M_SIZE, 0)); fixnumClass.defineMethod("[]", CallbackFactory.getMethod(RubyFixnum.class, "aref", RubyInteger.class)); fixnumClass.defineMethod("hash", IndexedCallback.create(M_HASH, 0)); fixnumClass.defineMethod("id2name", IndexedCallback.create(M_ID2NAME, 0)); fixnumClass.defineMethod("~", IndexedCallback.create(M_INVERT, 0)); fixnumClass.defineMethod("id", IndexedCallback.create(M_ID, 0)); return fixnumClass; }
3,233,958
public static RubyClass createFixnumClass(Ruby ruby) { RubyClass fixnumClass = ruby.defineClass("Fixnum", ruby.getClasses().getIntegerClass()); fixnumClass.includeModule(ruby.getClasses().getPrecisionModule()); fixnumClass.defineSingletonMethod("induced_from", CallbackFactory.getSingletonMethod(RubyFixnum.class, "induced_from", IRubyObject.class)); fixnumClass.defineMethod("to_f", IndexedCallback.create(M_TO_F, 0)); fixnumClass.defineMethod("to_s", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("to_str", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("taint", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("freeze", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("<<", IndexedCallback.create(M_OP_LSHIFT, 1)); fixnumClass.defineMethod(">>", IndexedCallback.create(M_OP_RSHIFT, 1)); fixnumClass.defineMethod("+", IndexedCallback.create(M_OP_PLUS, 1)); fixnumClass.defineMethod("-", IndexedCallback.create(M_OP_MINUS, 1)); fixnumClass.defineMethod("*", IndexedCallback.create(M_OP_MUL, 1)); fixnumClass.defineMethod("/", IndexedCallback.create(M_OP_DIV, 1)); fixnumClass.defineMethod("%", IndexedCallback.create(M_OP_MOD, 1)); fixnumClass.defineMethod("**", IndexedCallback.create(M_OP_POW, 1)); fixnumClass.defineMethod("==", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("eql?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("equal?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("<=>", IndexedCallback.create(M_OP_CMP, 1)); fixnumClass.defineMethod(">", IndexedCallback.create(M_OP_GT, 1)); fixnumClass.defineMethod(">=", IndexedCallback.create(M_OP_GE, 1)); fixnumClass.defineMethod("<", IndexedCallback.create(M_OP_LT, 1)); fixnumClass.defineMethod("<=", IndexedCallback.create(M_OP_LE, 1)); fixnumClass.defineMethod("&", IndexedCallback.create(M_OP_AND, 1)); fixnumClass.defineMethod("|", CallbackFactory.getMethod(RubyFixnum.class, "op_or", RubyInteger.class)); fixnumClass.defineMethod("^", CallbackFactory.getMethod(RubyFixnum.class, "op_xor", RubyInteger.class)); fixnumClass.defineMethod("size", IndexedCallback.create(M_SIZE, 0)); fixnumClass.defineMethod("[]", CallbackFactory.getMethod(RubyFixnum.class, "aref", RubyInteger.class)); fixnumClass.defineMethod("hash", IndexedCallback.create(M_HASH, 0)); fixnumClass.defineMethod("id2name", IndexedCallback.create(M_ID2NAME, 0)); fixnumClass.defineMethod("~", IndexedCallback.create(M_INVERT, 0)); fixnumClass.defineMethod("id", IndexedCallback.create(M_ID, 0)); return fixnumClass; }
public static RubyClass createFixnumClass(Ruby ruby) { RubyClass fixnumClass = ruby.defineClass("Fixnum", ruby.getClasses().getIntegerClass()); fixnumClass.includeModule(ruby.getClasses().getPrecisionModule()); fixnumClass.defineSingletonMethod("induced_from", CallbackFactory.getSingletonMethod(RubyFixnum.class, "induced_from", IRubyObject.class)); fixnumClass.defineMethod("to_f", IndexedCallback.create(M_TO_F, 0)); fixnumClass.defineMethod("to_s", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("to_str", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("taint", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("freeze", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("<<", IndexedCallback.create(M_OP_LSHIFT, 1)); fixnumClass.defineMethod(">>", IndexedCallback.create(M_OP_RSHIFT, 1)); fixnumClass.defineMethod("+", IndexedCallback.create(M_OP_PLUS, 1)); fixnumClass.defineMethod("-", IndexedCallback.create(M_OP_MINUS, 1)); fixnumClass.defineMethod("*", IndexedCallback.create(M_OP_MUL, 1)); fixnumClass.defineMethod("/", IndexedCallback.create(M_OP_DIV, 1)); fixnumClass.defineMethod("%", IndexedCallback.create(M_OP_MOD, 1)); fixnumClass.defineMethod("**", IndexedCallback.create(M_OP_POW, 1)); fixnumClass.defineMethod("==", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("eql?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("equal?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("<=>", IndexedCallback.create(M_OP_CMP, 1)); fixnumClass.defineMethod(">", IndexedCallback.create(M_OP_GT, 1)); fixnumClass.defineMethod(">=", IndexedCallback.create(M_OP_GE, 1)); fixnumClass.defineMethod("<", IndexedCallback.create(M_OP_LT, 1)); fixnumClass.defineMethod("<=", IndexedCallback.create(M_OP_LE, 1)); fixnumClass.defineMethod("&", IndexedCallback.create(M_OP_AND, 1)); fixnumClass.defineMethod("|", CallbackFactory.getMethod(RubyFixnum.class, "op_or", RubyInteger.class)); fixnumClass.defineMethod("^", CallbackFactory.getMethod(RubyFixnum.class, "op_xor", RubyInteger.class)); fixnumClass.defineMethod("[]", CallbackFactory.getMethod(RubyFixnum.class, "aref", RubyInteger.class)); fixnumClass.defineMethod("hash", IndexedCallback.create(M_HASH, 0)); fixnumClass.defineMethod("id2name", IndexedCallback.create(M_ID2NAME, 0)); fixnumClass.defineMethod("~", IndexedCallback.create(M_INVERT, 0)); fixnumClass.defineMethod("id", IndexedCallback.create(M_ID, 0)); return fixnumClass; }
3,233,959
public static RubyClass createFixnumClass(Ruby ruby) { RubyClass fixnumClass = ruby.defineClass("Fixnum", ruby.getClasses().getIntegerClass()); fixnumClass.includeModule(ruby.getClasses().getPrecisionModule()); fixnumClass.defineSingletonMethod("induced_from", CallbackFactory.getSingletonMethod(RubyFixnum.class, "induced_from", IRubyObject.class)); fixnumClass.defineMethod("to_f", IndexedCallback.create(M_TO_F, 0)); fixnumClass.defineMethod("to_s", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("to_str", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("taint", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("freeze", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("<<", IndexedCallback.create(M_OP_LSHIFT, 1)); fixnumClass.defineMethod(">>", IndexedCallback.create(M_OP_RSHIFT, 1)); fixnumClass.defineMethod("+", IndexedCallback.create(M_OP_PLUS, 1)); fixnumClass.defineMethod("-", IndexedCallback.create(M_OP_MINUS, 1)); fixnumClass.defineMethod("*", IndexedCallback.create(M_OP_MUL, 1)); fixnumClass.defineMethod("/", IndexedCallback.create(M_OP_DIV, 1)); fixnumClass.defineMethod("%", IndexedCallback.create(M_OP_MOD, 1)); fixnumClass.defineMethod("**", IndexedCallback.create(M_OP_POW, 1)); fixnumClass.defineMethod("==", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("eql?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("equal?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("<=>", IndexedCallback.create(M_OP_CMP, 1)); fixnumClass.defineMethod(">", IndexedCallback.create(M_OP_GT, 1)); fixnumClass.defineMethod(">=", IndexedCallback.create(M_OP_GE, 1)); fixnumClass.defineMethod("<", IndexedCallback.create(M_OP_LT, 1)); fixnumClass.defineMethod("<=", IndexedCallback.create(M_OP_LE, 1)); fixnumClass.defineMethod("&", IndexedCallback.create(M_OP_AND, 1)); fixnumClass.defineMethod("|", CallbackFactory.getMethod(RubyFixnum.class, "op_or", RubyInteger.class)); fixnumClass.defineMethod("^", CallbackFactory.getMethod(RubyFixnum.class, "op_xor", RubyInteger.class)); fixnumClass.defineMethod("size", IndexedCallback.create(M_SIZE, 0)); fixnumClass.defineMethod("[]", CallbackFactory.getMethod(RubyFixnum.class, "aref", RubyInteger.class)); fixnumClass.defineMethod("hash", IndexedCallback.create(M_HASH, 0)); fixnumClass.defineMethod("id2name", IndexedCallback.create(M_ID2NAME, 0)); fixnumClass.defineMethod("~", IndexedCallback.create(M_INVERT, 0)); fixnumClass.defineMethod("id", IndexedCallback.create(M_ID, 0)); return fixnumClass; }
public static RubyClass createFixnumClass(Ruby ruby) { RubyClass fixnumClass = ruby.defineClass("Fixnum", ruby.getClasses().getIntegerClass()); fixnumClass.includeModule(ruby.getClasses().getPrecisionModule()); fixnumClass.defineSingletonMethod("induced_from", CallbackFactory.getSingletonMethod(RubyFixnum.class, "induced_from", IRubyObject.class)); fixnumClass.defineMethod("to_f", IndexedCallback.create(M_TO_F, 0)); fixnumClass.defineMethod("to_s", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("to_str", IndexedCallback.create(M_TO_S, 0)); fixnumClass.defineMethod("taint", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("freeze", CallbackFactory.getSelfMethod(0)); fixnumClass.defineMethod("<<", IndexedCallback.create(M_OP_LSHIFT, 1)); fixnumClass.defineMethod(">>", IndexedCallback.create(M_OP_RSHIFT, 1)); fixnumClass.defineMethod("+", IndexedCallback.create(M_OP_PLUS, 1)); fixnumClass.defineMethod("-", IndexedCallback.create(M_OP_MINUS, 1)); fixnumClass.defineMethod("*", IndexedCallback.create(M_OP_MUL, 1)); fixnumClass.defineMethod("/", IndexedCallback.create(M_OP_DIV, 1)); fixnumClass.defineMethod("%", IndexedCallback.create(M_OP_MOD, 1)); fixnumClass.defineMethod("**", IndexedCallback.create(M_OP_POW, 1)); fixnumClass.defineMethod("==", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("eql?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("equal?", IndexedCallback.create(M_EQUAL, 1)); fixnumClass.defineMethod("<=>", IndexedCallback.create(M_OP_CMP, 1)); fixnumClass.defineMethod(">", IndexedCallback.create(M_OP_GT, 1)); fixnumClass.defineMethod(">=", IndexedCallback.create(M_OP_GE, 1)); fixnumClass.defineMethod("<", IndexedCallback.create(M_OP_LT, 1)); fixnumClass.defineMethod("<=", IndexedCallback.create(M_OP_LE, 1)); fixnumClass.defineMethod("&", IndexedCallback.create(M_OP_AND, 1)); fixnumClass.defineMethod("|", CallbackFactory.getMethod(RubyFixnum.class, "op_or", RubyInteger.class)); fixnumClass.defineMethod("^", CallbackFactory.getMethod(RubyFixnum.class, "op_xor", RubyInteger.class)); fixnumClass.defineMethod("size", IndexedCallback.create(M_SIZE, 0)); fixnumClass.defineMethod("[]", CallbackFactory.getMethod(RubyFixnum.class, "aref", RubyInteger.class)); fixnumClass.defineMethod("hash", IndexedCallback.create(M_HASH, 0)); fixnumClass.defineMethod("id2name", IndexedCallback.create(M_ID2NAME, 0)); fixnumClass.defineMethod("~", IndexedCallback.create(M_INVERT, 0)); fixnumClass.defineMethod("id", IndexedCallback.create(M_ID, 0)); return fixnumClass; }
3,233,960
public static void main(String arg[]) { Log.traceExceptions(true); Log.setLevel(Log.ALL); Log.setTarget(System.err); if (arg.length != 0) { System.out.println("Enabling log types"); Log.enableTypes(arg); } // Build a context WebMacro wm = null; Context context = null; try { wm = new WM(); context = new Context(null); Object names[] = { "prop" }; context.setProperty(names, "Example property"); } catch (Exception e) { e.printStackTrace(); } context.put("helloworld", "Hello World"); context.put("hello", "Hello"); context.put("file", "include.txt"); TestObject[] fruits = { new TestObject("apple",false), new TestObject("lemon",true), new TestObject("pear",false), new TestObject("orange",true), new TestObject("watermelon",false), new TestObject("peach",false), new TestObject("lime",true) }; SelectList sl = new SelectList(fruits, 3); context.put("sl-fruits", sl); context.put("fruits", fruits); context.put("flipper", new TestObject("flip",false)); System.out.println("- - - - - - - - - - - - - - - - - - - -"); System.out.println("Context contains: helloWorld, hello, file, TestObject[] fruits, SelectList sl(fruits, 3), TestObject flipper"); System.out.println("- - - - - - - - - - - - - - - - - - - -"); try { Template t1 = new StreamTemplate(wm.getBroker(), new InputStreamReader(System.in)); t1.parse(); Writer w = new OutputStreamWriter(System.out); System.out.println("*** RESULT ***"); t1.write(w,context); w.close(); System.out.println("*** DONE ***"); //System.out.println(result); } catch (Exception e) { e.printStackTrace(); } }
public static void main(String arg[]) { Log.traceExceptions(true); Log.setLevel(Log.ALL); Log.setTarget(System.err); if (arg.length != 0) { System.out.println("Enabling log types"); Log.enableTypes(arg); } // Build a context WebMacro wm = null; Context context = null; try { wm = new WM(); context = new Context(null); Object names[] = { "prop" }; context.setProperty(names, "Example property"); } catch (Exception e) { e.printStackTrace(); } context.put("helloworld", "Hello World"); context.put("hello", "Hello"); context.put("file", "include.txt"); TestObject[] fruits = { new TestObject("apple",false), new TestObject("lemon",true), new TestObject("pear",false), new TestObject("orange",true), new TestObject("watermelon",false), new TestObject("peach",false), new TestObject("lime",true) }; SelectList sl = new SelectList(fruits, 3); context.put("sl-fruits", sl); context.put("fruits", fruits); context.put("flipper", new TestObject("flip",false)); System.out.println("- - - - - - - - - - - - - - - - - - - -"); System.out.println("Context contains: helloWorld, hello, file, TestObject[] fruits, SelectList sl(fruits, 3), TestObject flipper"); System.out.println("- - - - - - - - - - - - - - - - - - - -"); try { Template t1 = new StreamTemplate(wm.getBroker(), new InputStreamReader(System.in)); t1.parse(); Writer w = new OutputStreamWriter(System.out); System.out.println("*** RESULT ***"); t1.write(w,context); w.close(); System.out.println("*** DONE ***"); //System.out.println(result); } catch (Exception e) { e.printStackTrace(); } }
3,233,961
public static void main(String arg[]) { Log.traceExceptions(true); Log.setLevel(Log.ALL); Log.setTarget(System.err); if (arg.length != 0) { System.out.println("Enabling log types"); Log.enableTypes(arg); } // Build a context WebMacro wm = null; Context context = null; try { wm = new WM(); context = new Context(null); Object names[] = { "prop" }; context.setProperty(names, "Example property"); } catch (Exception e) { e.printStackTrace(); } context.put("helloworld", "Hello World"); context.put("hello", "Hello"); context.put("file", "include.txt"); TestObject[] fruits = { new TestObject("apple",false), new TestObject("lemon",true), new TestObject("pear",false), new TestObject("orange",true), new TestObject("watermelon",false), new TestObject("peach",false), new TestObject("lime",true) }; SelectList sl = new SelectList(fruits, 3); context.put("sl-fruits", sl); context.put("fruits", fruits); context.put("flipper", new TestObject("flip",false)); System.out.println("- - - - - - - - - - - - - - - - - - - -"); System.out.println("Context contains: helloWorld, hello, file, TestObject[] fruits, SelectList sl(fruits, 3), TestObject flipper"); System.out.println("- - - - - - - - - - - - - - - - - - - -"); try { Template t1 = new StreamTemplate(wm.getBroker(), new InputStreamReader(System.in)); t1.parse(); Writer w = new OutputStreamWriter(System.out); System.out.println("*** RESULT ***"); t1.write(w,context); w.close(); System.out.println("*** DONE ***"); //System.out.println(result); } catch (Exception e) { e.printStackTrace(); } }
public static void main(String arg[]) { Log.traceExceptions(true); Log.setLevel(Log.ALL); Log.setTarget(System.err); if (arg.length != 0) { System.out.println("Enabling log types"); Log.enableTypes(arg); } // Build a context WebMacro wm = null; Context context = null; try { wm = new WM(); context = new Context(null); Object names[] = { "prop" }; context.setProperty(names, "Example property"); } catch (Exception e) { e.printStackTrace(); } context.put("helloworld", "Hello World"); context.put("hello", "Hello"); context.put("file", "include.txt"); TestObject[] fruits = { new TestObject("apple",false), new TestObject("lemon",true), new TestObject("pear",false), new TestObject("orange",true), new TestObject("watermelon",false), new TestObject("peach",false), new TestObject("lime",true) }; SelectList sl = new SelectList(fruits, 3); context.put("sl-fruits", sl); context.put("fruits", fruits); context.put("flipper", new TestObject("flip",false)); System.out.println("- - - - - - - - - - - - - - - - - - - -"); System.out.println("Context contains: helloWorld, hello, file, TestObject[] fruits, SelectList sl(fruits, 3), TestObject flipper"); System.out.println("- - - - - - - - - - - - - - - - - - - -"); try { Template t1 = new StreamTemplate(wm.getBroker(), new InputStreamReader(System.in)); t1.parse(); Writer w = new OutputStreamWriter(System.out); System.out.println("*** RESULT ***"); t1.write(w,context); w.close(); System.out.println("*** DONE ***"); //System.out.println(result); } catch (Exception e) { e.printStackTrace(); } }
3,233,962
public static void main(String arg[]) { Log.traceExceptions(true); Log.setLevel(Log.ALL); Log.setTarget(System.err); if (arg.length != 0) { System.out.println("Enabling log types"); Log.enableTypes(arg); } // Build a context WebMacro wm = null; Context context = null; try { wm = new WM(); context = new Context(null); Object names[] = { "prop" }; context.setProperty(names, "Example property"); } catch (Exception e) { e.printStackTrace(); } context.put("helloworld", "Hello World"); context.put("hello", "Hello"); context.put("file", "include.txt"); TestObject[] fruits = { new TestObject("apple",false), new TestObject("lemon",true), new TestObject("pear",false), new TestObject("orange",true), new TestObject("watermelon",false), new TestObject("peach",false), new TestObject("lime",true) }; SelectList sl = new SelectList(fruits, 3); context.put("sl-fruits", sl); context.put("fruits", fruits); context.put("flipper", new TestObject("flip",false)); System.out.println("- - - - - - - - - - - - - - - - - - - -"); System.out.println("Context contains: helloWorld, hello, file, TestObject[] fruits, SelectList sl(fruits, 3), TestObject flipper"); System.out.println("- - - - - - - - - - - - - - - - - - - -"); try { Template t1 = new StreamTemplate(wm.getBroker(), new InputStreamReader(System.in)); t1.parse(); Writer w = new OutputStreamWriter(System.out); System.out.println("*** RESULT ***"); t1.write(w,context); w.close(); System.out.println("*** DONE ***"); //System.out.println(result); } catch (Exception e) { e.printStackTrace(); } }
public static void main(String arg[]) { Log.traceExceptions(true); Log.setLevel(Log.ALL); Log.setTarget(System.err); if (arg.length != 0) { System.out.println("Enabling log types"); Log.enableTypes(arg); } // Build a context WebMacro wm = null; Context context = null; try { wm = new WM(); context = new Context(null); Object names[] = { "prop" }; context.setProperty(names, "Example property"); } catch (Exception e) { e.printStackTrace(); } context.put("helloworld", "Hello World"); context.put("hello", "Hello"); context.put("file", "include.txt"); TestObject[] fruits = { new TestObject("apple",false), new TestObject("lemon",true), new TestObject("pear",false), new TestObject("orange",true), new TestObject("watermelon",false), new TestObject("peach",false), new TestObject("lime",true) }; SelectList sl = new SelectList(fruits, 3); context.put("sl-fruits", sl); context.put("fruits", fruits); context.put("flipper", new TestObject("flip",false)); System.out.println("- - - - - - - - - - - - - - - - - - - -"); System.out.println("Context contains: helloWorld, hello, file, TestObject[] fruits, SelectList sl(fruits, 3), TestObject flipper"); System.out.println("- - - - - - - - - - - - - - - - - - - -"); try { Template t1 = new StreamTemplate(wm.getBroker(), new InputStreamReader(System.in)); t1.parse(); Writer w = new OutputStreamWriter(System.out); System.out.println("*** RESULT ***"); t1.write(w,context); w.close(); System.out.println("*** DONE ***"); //System.out.println(result); } catch (Exception e) { e.printStackTrace(); } }
3,233,963
public static void main(String arg[]) { Log.traceExceptions(true); Log.setLevel(Log.ALL); Log.setTarget(System.err); if (arg.length != 0) { System.out.println("Enabling log types"); Log.enableTypes(arg); } // Build a context WebMacro wm = null; Context context = null; try { wm = new WM(); context = new Context(null); Object names[] = { "prop" }; context.setProperty(names, "Example property"); } catch (Exception e) { e.printStackTrace(); } context.put("helloworld", "Hello World"); context.put("hello", "Hello"); context.put("file", "include.txt"); TestObject[] fruits = { new TestObject("apple",false), new TestObject("lemon",true), new TestObject("pear",false), new TestObject("orange",true), new TestObject("watermelon",false), new TestObject("peach",false), new TestObject("lime",true) }; SelectList sl = new SelectList(fruits, 3); context.put("sl-fruits", sl); context.put("fruits", fruits); context.put("flipper", new TestObject("flip",false)); System.out.println("- - - - - - - - - - - - - - - - - - - -"); System.out.println("Context contains: helloWorld, hello, file, TestObject[] fruits, SelectList sl(fruits, 3), TestObject flipper"); System.out.println("- - - - - - - - - - - - - - - - - - - -"); try { Template t1 = new StreamTemplate(wm.getBroker(), new InputStreamReader(System.in)); t1.parse(); Writer w = new OutputStreamWriter(System.out); System.out.println("*** RESULT ***"); t1.write(w,context); w.close(); System.out.println("*** DONE ***"); //System.out.println(result); } catch (Exception e) { e.printStackTrace(); } }
public static void main(String arg[]) { Log.traceExceptions(true); Log.setLevel(Log.ALL); Log.setTarget(System.err); if (arg.length != 0) { System.out.println("Enabling log types"); Log.enableTypes(arg); } // Build a context WebMacro wm = null; Context context = null; try { wm = new WM(); context = new Context(null); Object names[] = { "prop" }; context.setProperty(names, "Example property"); } catch (Exception e) { e.printStackTrace(); } context.put("helloworld", "Hello World"); context.put("hello", "Hello"); context.put("file", "include.txt"); TestObject[] fruits = { new TestObject("apple",false), new TestObject("lemon",true), new TestObject("pear",false), new TestObject("orange",true), new TestObject("watermelon",false), new TestObject("peach",false), new TestObject("lime",true) }; SelectList sl = new SelectList(fruits, 3); context.put("sl-fruits", sl); context.put("fruits", fruits); context.put("flipper", new TestObject("flip",false)); System.out.println("- - - - - - - - - - - - - - - - - - - -"); System.out.println("Context contains: helloWorld, hello, file, TestObject[] fruits, SelectList sl(fruits, 3), TestObject flipper"); System.out.println("- - - - - - - - - - - - - - - - - - - -"); try { Template t1 = new StreamTemplate(wm.getBroker(), new InputStreamReader(System.in)); t1.parse(); Writer w = new OutputStreamWriter(System.out); System.out.println("*** RESULT ***"); t1.write(w,context); w.close(); System.out.println("*** DONE ***"); //System.out.println(result); } catch (Exception e) { e.printStackTrace(); } }
3,233,964
public static void main(String arg[]) { Log.traceExceptions(true); Log.setLevel(Log.ALL); Log.setTarget(System.err); if (arg.length != 0) { System.out.println("Enabling log types"); Log.enableTypes(arg); } // Build a context WebMacro wm = null; Context context = null; try { wm = new WM(); context = new Context(null); Object names[] = { "prop" }; context.setProperty(names, "Example property"); } catch (Exception e) { e.printStackTrace(); } context.put("helloworld", "Hello World"); context.put("hello", "Hello"); context.put("file", "include.txt"); TestObject[] fruits = { new TestObject("apple",false), new TestObject("lemon",true), new TestObject("pear",false), new TestObject("orange",true), new TestObject("watermelon",false), new TestObject("peach",false), new TestObject("lime",true) }; SelectList sl = new SelectList(fruits, 3); context.put("sl-fruits", sl); context.put("fruits", fruits); context.put("flipper", new TestObject("flip",false)); System.out.println("- - - - - - - - - - - - - - - - - - - -"); System.out.println("Context contains: helloWorld, hello, file, TestObject[] fruits, SelectList sl(fruits, 3), TestObject flipper"); System.out.println("- - - - - - - - - - - - - - - - - - - -"); try { Template t1 = new StreamTemplate(wm.getBroker(), new InputStreamReader(System.in)); t1.parse(); Writer w = new OutputStreamWriter(System.out); System.out.println("*** RESULT ***"); t1.write(w,context); w.close(); System.out.println("*** DONE ***"); //System.out.println(result); } catch (Exception e) { e.printStackTrace(); } }
public static void main(String arg[]) { Log.traceExceptions(true); Log.setLevel(Log.ALL); Log.setTarget(System.err); if (arg.length != 0) { System.out.println("Enabling log types"); Log.enableTypes(arg); } // Build a context WebMacro wm = null; Context context = null; System.out.println("- - - - - - - - - - - - - - - - - - - -"); System.out.println("Context contains: helloWorld, hello, file, TestObject[] fruits, SelectList sl(fruits, 3), TestObject flipper"); System.out.println("- - - - - - - - - - - - - - - - - - - -"); wm = new WM(); context = new Context(null); Object names[] = { "prop" }; context.setProperty(names, "Example property"); } catch (Exception e) { e.printStackTrace(); } context.put("helloworld", "Hello World"); context.put("hello", "Hello"); context.put("file", "include.txt"); TestObject[] fruits = { new TestObject("apple",false), new TestObject("lemon",true), new TestObject("pear",false), new TestObject("orange",true), new TestObject("watermelon",false), new TestObject("peach",false), new TestObject("lime",true) }; SelectList sl = new SelectList(fruits, 3); context.put("sl-fruits", sl); context.put("fruits", fruits); context.put("flipper", new TestObject("flip",false)); System.out.println("- - - - - - - - - - - - - - - - - - - -"); System.out.println("Context contains: helloWorld, hello, file, TestObject[] fruits, SelectList sl(fruits, 3), TestObject flipper"); System.out.println("- - - - - - - - - - - - - - - - - - - -"); System.out.println("- - - - - - - - - - - - - - - - - - - -"); System.out.println("Context contains: helloWorld, hello, file, TestObject[] fruits, SelectList sl(fruits, 3), TestObject flipper"); System.out.println("- - - - - - - - - - - - - - - - - - - -"); Template t1 = new StreamTemplate(wm.getBroker(), new InputStreamReader(System.in)); t1.parse(); Writer w = new OutputStreamWriter(System.out); System.out.println("*** RESULT ***"); t1.write(w,context); w.close(); System.out.println("*** DONE ***"); //System.out.println(result); } catch (Exception e) { e.printStackTrace(); } }
3,233,965
public JavaConstructor constructor(IRubyObject[] args) { try { Class[] parameterTypes = buildClassArgs(args); Constructor constructor; constructor = javaClass().getConstructor(parameterTypes); return new JavaConstructor(getRuntime(), constructor); } catch (NoSuchMethodException nsme) { throw getRuntime().newNameError("no matching java constructor"); } }
public JavaConstructor constructor(IRubyObject[] args) { try { Class[] parameterTypes = buildClassArgs(args); Constructor constructor; constructor = javaClass().getConstructor(parameterTypes); return new JavaConstructor(getRuntime(), constructor); } catch (NoSuchMethodException nsme) { throw getRuntime().newNameError("no matching java constructor", null); } }
3,233,966
public JavaConstructor declared_constructor(IRubyObject[] args) { try { Class[] parameterTypes = buildClassArgs(args); Constructor constructor; constructor = javaClass().getDeclaredConstructor (parameterTypes); return new JavaConstructor(getRuntime(), constructor); } catch (NoSuchMethodException nsme) { throw getRuntime().newNameError("no matching java constructor"); } }
public JavaConstructor declared_constructor(IRubyObject[] args) { try { Class[] parameterTypes = buildClassArgs(args); Constructor constructor; constructor = javaClass().getDeclaredConstructor (parameterTypes); return new JavaConstructor(getRuntime(), constructor); } catch (NoSuchMethodException nsme) { throw getRuntime().newNameError("no matching java constructor", null); } }
3,233,967
public JavaField declared_field(IRubyObject name) { String stringName = name.asSymbol(); try { Field field = javaClass().getDeclaredField(stringName); return new JavaField(getRuntime(),field); } catch (NoSuchFieldException nsfe) { throw getRuntime().newNameError(undefinedFieldMessage(stringName)); } }
public JavaField declared_field(IRubyObject name) { String stringName = name.asSymbol(); try { Field field = javaClass().getDeclaredField(stringName); return new JavaField(getRuntime(),field); } catch (NoSuchFieldException nsfe) { throw undefinedFieldError(stringName); } }
3,233,968
public JavaField field(IRubyObject name) { String stringName = name.asSymbol(); try { Field field = javaClass().getField(stringName); return new JavaField(getRuntime(),field); } catch (NoSuchFieldException nsfe) { throw getRuntime().newNameError(undefinedFieldMessage(stringName)); } }
public JavaField field(IRubyObject name) { String stringName = name.asSymbol(); try { Field field = javaClass().getField(stringName); return new JavaField(getRuntime(),field); } catch (NoSuchFieldException nsfe) { throw undefinedFieldError(stringName); } }
3,233,969