bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
|---|---|---|
public RubyObject m_private_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PRIVATE) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
|
public RubyObject m_private_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PRIVATE) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
| 3,235,154
|
public RubyObject m_private_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PRIVATE) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
|
public RubyObject m_private_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PRIVATE) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
| 3,235,155
|
public RubyObject m_private_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PRIVATE) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
|
public RubyObject m_private_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PRIVATE) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
| 3,235,156
|
public RubyObject m_private_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PRIVATE) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
|
public RubyObject m_private_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PRIVATE) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
| 3,235,157
|
public RubyObject m_private_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PRIVATE) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
|
public RubyObject m_private_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PRIVATE) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
| 3,235,158
|
public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PRIVATE) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; }
|
public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PRIVATE) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; }
| 3,235,159
|
public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PRIVATE) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; }
|
public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PRIVATE) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; }
| 3,235,160
|
public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PRIVATE) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; }
|
public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PRIVATE) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; }
| 3,235,161
|
public RubyObject m_protected(RubyObject[] args) { if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException( getRuby(), "Insecure: can't change method visibility"); } if (args.length == 0) { getRuby().setActMethodScope(Constants.SCOPE_PROTECTED); } else { setMethodVisibility(args, Constants.NOEX_PROTECTED); } return this; }
|
public RubyObject m_protected(RubyObject[] args) { if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException( getRuby(), "Insecure: can't change method visibility"); } if (args.length == 0) { getRuby().setActMethodScope(Constants.SCOPE_PROTECTED); } else { setMethodVisibility(args, Constants.NOEX_PROTECTED); } return this; }
| 3,235,162
|
public RubyObject m_protected(RubyObject[] args) { if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException( getRuby(), "Insecure: can't change method visibility"); } if (args.length == 0) { getRuby().setActMethodScope(Constants.SCOPE_PROTECTED); } else { setMethodVisibility(args, Constants.NOEX_PROTECTED); } return this; }
|
public RubyObject m_protected(RubyObject[] args) { if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException( getRuby(), "Insecure: can't change method visibility"); } if (args.length == 0) { getRuby().setActMethodScope(Constants.SCOPE_PROTECTED); } else { setMethodVisibility(args, Constants.NOEX_PROTECTED); } return this; }
| 3,235,163
|
public RubyObject m_protected(RubyObject[] args) { if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException( getRuby(), "Insecure: can't change method visibility"); } if (args.length == 0) { getRuby().setActMethodScope(Constants.SCOPE_PROTECTED); } else { setMethodVisibility(args, Constants.NOEX_PROTECTED); } return this; }
|
public RubyObject m_protected(RubyObject[] args) { if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException( getRuby(), "Insecure: can't change method visibility"); } if (args.length == 0) { getRuby().setActMethodScope(Constants.SCOPE_PROTECTED); } else { setMethodVisibility(args, Constants.NOEX_PROTECTED); } return this; }
| 3,235,164
|
public RubyObject m_protected_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PROTECTED) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
|
public RubyObject m_protected_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PROTECTED) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
| 3,235,165
|
public RubyObject m_protected_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PROTECTED) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
|
public RubyObject m_protected_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PROTECTED) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
| 3,235,166
|
public RubyObject m_protected_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PROTECTED) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
|
public RubyObject m_protected_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PROTECTED) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
| 3,235,167
|
public RubyObject m_protected_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PROTECTED) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
|
public RubyObject m_protected_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PROTECTED) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
| 3,235,168
|
public RubyObject m_protected_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PROTECTED) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
|
public RubyObject m_protected_instance_methods(RubyObject[] args) { boolean includeSuper = false; if (args.length > 0) { includeSuper = args[0].isTrue(); } return methodList(includeSuper, new RubyMapMethod() { public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PROTECTED) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; } }); }
| 3,235,169
|
public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PROTECTED) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; }
|
public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PROTECTED) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; }
| 3,235,170
|
public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PROTECTED) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; }
|
public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PROTECTED) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; }
| 3,235,171
|
public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PROTECTED) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; }
|
public int execute(Object key, Object value, Object arg) { // cast args RubyId id = (RubyId) key; MethodNode body = (MethodNode) value; RubyArray ary = (RubyArray) arg; if (body.getBodyNode() == null) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } else if ((body.getNoex() & Constants.NOEX_PROTECTED) != 0) { RubyString name = RubyString.m_newString(getRuby(), id.toName()); if (ary.m_includes(name).isFalse()) { ary.push(name); } } else if (body.getBodyNode() instanceof ZSuperNode) { ary.push(getRuby().getNil()); ary.push(RubyString.m_newString(getRuby(), id.toName())); } return RubyMapMethod.CONTINUE; }
| 3,235,172
|
public RubyObject m_public(RubyObject[] args) { if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException( getRuby(), "Insecure: can't change method visibility"); } if (args.length == 0) { getRuby().setActMethodScope(Constants.SCOPE_PUBLIC); } else { setMethodVisibility(args, Constants.NOEX_PUBLIC); } return this; }
|
public RubyObject m_public(RubyObject[] args) { if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException( getRuby(), "Insecure: can't change method visibility"); } if (args.length == 0) { getRuby().setActMethodScope(Constants.SCOPE_PUBLIC); } else { setMethodVisibility(args, Constants.NOEX_PUBLIC); } return this; }
| 3,235,173
|
public RubyObject m_public(RubyObject[] args) { if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException( getRuby(), "Insecure: can't change method visibility"); } if (args.length == 0) { getRuby().setActMethodScope(Constants.SCOPE_PUBLIC); } else { setMethodVisibility(args, Constants.NOEX_PUBLIC); } return this; }
|
public RubyObject m_public(RubyObject[] args) { if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException( getRuby(), "Insecure: can't change method visibility"); } if (args.length == 0) { getRuby().setActMethodScope(Constants.SCOPE_PUBLIC); } else { setMethodVisibility(args, Constants.NOEX_PUBLIC); } return this; }
| 3,235,174
|
public RubyObject m_public(RubyObject[] args) { if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException( getRuby(), "Insecure: can't change method visibility"); } if (args.length == 0) { getRuby().setActMethodScope(Constants.SCOPE_PUBLIC); } else { setMethodVisibility(args, Constants.NOEX_PUBLIC); } return this; }
|
public RubyObject m_public(RubyObject[] args) { if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException( getRuby(), "Insecure: can't change method visibility"); } if (args.length == 0) { getRuby().setActMethodScope(Constants.SCOPE_PUBLIC); } else { setMethodVisibility(args, Constants.NOEX_PUBLIC); } return this; }
| 3,235,175
|
public RubyObject m_public_class_method(RubyObject[] args) { getRubyClass().setMethodVisibility(args, Constants.NOEX_PUBLIC); return this; }
|
public RubyObject m_public_class_method(RubyObject[] args) { getRubyClass().setMethodVisibility(args, Constants.NOEX_PUBLIC); return this; }
| 3,235,176
|
public RubyObject m_remove_class_variable(RubyObject name) { RubyId id = null; if (name instanceof RubySymbol) { id = ((RubySymbol) name).toId(); } else if (name instanceof RubyString) { id = getRuby().intern(((RubyString) name).getValue()); } if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } if (getInstanceVariables() != null) { Object value = getInstanceVariables().remove(id); if (value != null) { return (RubyObject) value; } } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
|
public RubyObject m_remove_class_variable(RubyObject name) { RubyId id = null; if (name instanceof RubySymbol) { id = ((RubySymbol) name).toId(); } else if (name instanceof RubyString) { id = getRuby().intern(((RubyString) name).getValue()); } if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } if (getInstanceVariables() != null) { Object value = getInstanceVariables().remove(id); if (value != null) { return (RubyObject) value; } } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
| 3,235,177
|
public RubyObject m_remove_class_variable(RubyObject name) { RubyId id = null; if (name instanceof RubySymbol) { id = ((RubySymbol) name).toId(); } else if (name instanceof RubyString) { id = getRuby().intern(((RubyString) name).getValue()); } if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } if (getInstanceVariables() != null) { Object value = getInstanceVariables().remove(id); if (value != null) { return (RubyObject) value; } } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
|
public RubyObject m_remove_class_variable(RubyObject name) { RubyId id = null; if (name instanceof RubySymbol) { id = ((RubySymbol) name).toId(); } else if (name instanceof RubyString) { id = getRuby().intern(((RubyString) name).getValue()); } if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } if (getInstanceVariables() != null) { Object value = getInstanceVariables().remove(id); if (value != null) { return (RubyObject) value; } } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
| 3,235,178
|
public RubyObject m_remove_class_variable(RubyObject name) { RubyId id = null; if (name instanceof RubySymbol) { id = ((RubySymbol) name).toId(); } else if (name instanceof RubyString) { id = getRuby().intern(((RubyString) name).getValue()); } if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } if (getInstanceVariables() != null) { Object value = getInstanceVariables().remove(id); if (value != null) { return (RubyObject) value; } } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
|
public RubyObject m_remove_class_variable(RubyObject name) { RubyId id = null; if (name instanceof RubySymbol) { id = ((RubySymbol) name).toId(); } else if (name instanceof RubyString) { id = getRuby().intern(((RubyString) name).getValue()); } if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } if (getInstanceVariables() != null) { Object value = getInstanceVariables().remove(id); if (value != null) { return (RubyObject) value; } } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
| 3,235,179
|
public RubyObject m_remove_class_variable(RubyObject name) { RubyId id = null; if (name instanceof RubySymbol) { id = ((RubySymbol) name).toId(); } else if (name instanceof RubyString) { id = getRuby().intern(((RubyString) name).getValue()); } if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } if (getInstanceVariables() != null) { Object value = getInstanceVariables().remove(id); if (value != null) { return (RubyObject) value; } } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
|
public RubyObject m_remove_class_variable(RubyObject name) { RubyId id = null; if (name instanceof RubySymbol) { id = ((RubySymbol) name).toId(); } else if (name instanceof RubyString) { id = getRuby().intern(((RubyString) name).getValue()); } if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } if (getInstanceVariables() != null) { Object value = getInstanceVariables().remove(id); if (value != null) { return (RubyObject) value; } } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
| 3,235,180
|
public RubyString m_to_s() { return (RubyString) getClassPath().m_dup(); }
|
public RubyString m_to_s() { return (RubyString) getClassPath().m_dup(); }
| 3,235,181
|
public RubyArray methodList(boolean option, RubyMapMethod method) { RubyArray ary = RubyArray.m_newArray(getRuby()); for (RubyModule klass = this; klass != null; klass = klass.getSuperClass()) { klass.methods.foreach(method, ary); if (!option) { break; } } Iterator iter = ary.getList().iterator(); while (iter.hasNext()) { if (getRuby().getNil() == iter.next()) { iter.remove(); iter.next(); } } return ary; }
|
public RubyArray methodList(boolean option, RubyMapMethod method) { RubyArray ary = RubyArray.m_newArray(getRuby()); for (RubyModule klass = this; klass != null; klass = klass.getSuperClass()) { klass.methods.foreach(method, ary); if (!option) { break; } } Iterator iter = ary.getList().iterator(); while (iter.hasNext()) { if (getRuby().getNil() == iter.next()) { iter.remove(); iter.next(); } } return ary; }
| 3,235,182
|
public RubyArray methodList(boolean option, RubyMapMethod method) { RubyArray ary = RubyArray.m_newArray(getRuby()); for (RubyModule klass = this; klass != null; klass = klass.getSuperClass()) { klass.methods.foreach(method, ary); if (!option) { break; } } Iterator iter = ary.getList().iterator(); while (iter.hasNext()) { if (getRuby().getNil() == iter.next()) { iter.remove(); iter.next(); } } return ary; }
|
public RubyArray methodList(boolean option, RubyMapMethod method) { RubyArray ary = RubyArray.m_newArray(getRuby()); for (RubyModule klass = this; klass != null; klass = klass.getSuperClass()) { klass.methods.foreach(method, ary); if (!option) { break; } } Iterator iter = ary.getList().iterator(); while (iter.hasNext()) { if (getRuby().getNil() == iter.next()) { iter.remove(); iter.next(); } } return ary; }
| 3,235,183
|
public RubyArray methodList(boolean option, RubyMapMethod method) { RubyArray ary = RubyArray.m_newArray(getRuby()); for (RubyModule klass = this; klass != null; klass = klass.getSuperClass()) { klass.methods.foreach(method, ary); if (!option) { break; } } Iterator iter = ary.getList().iterator(); while (iter.hasNext()) { if (getRuby().getNil() == iter.next()) { iter.remove(); iter.next(); } } return ary; }
|
public RubyArray methodList(boolean option, RubyMapMethod method) { RubyArray ary = RubyArray.m_newArray(getRuby()); for (RubyModule klass = this; klass != null; klass = klass.getSuperClass()) { klass.methods.foreach(method, ary); if (!option) { break; } } Iterator iter = ary.getList().iterator(); while (iter.hasNext()) { if (getRuby().getNil() == iter.next()) { iter.remove(); iter.next(); } } return ary; }
| 3,235,184
|
public RubyArray methodList(boolean option, RubyMapMethod method) { RubyArray ary = RubyArray.m_newArray(getRuby()); for (RubyModule klass = this; klass != null; klass = klass.getSuperClass()) { klass.methods.foreach(method, ary); if (!option) { break; } } Iterator iter = ary.getList().iterator(); while (iter.hasNext()) { if (getRuby().getNil() == iter.next()) { iter.remove(); iter.next(); } } return ary; }
|
public RubyArray methodList(boolean option, RubyMapMethod method) { RubyArray ary = RubyArray.m_newArray(getRuby()); for (RubyModule klass = this; klass != null; klass = klass.getSuperClass()) { klass.methods.foreach(method, ary); if (!option) { break; } } Iterator iter = ary.getList().iterator(); while (iter.hasNext()) { if (getRuby().getNil() == iter.next()) { iter.remove(); iter.next(); } } return ary; }
| 3,235,185
|
public RubyClass newIncludeClass(RubyModule superClass) { RubyClass newClass = new RubyClass(getRuby(), superClass); newClass.setIncluded(true); newClass.setInstanceVariables(getInstanceVariables()); newClass.setMethods(methods); if (isIncluded()) { newClass.setRubyClass(getRubyClass()); } else { newClass.setRubyClass(this); } return newClass; }
|
public RubyClass newIncludeClass(RubyModule superClass) { RubyClass newClass = new RubyClass(getRuby(), superClass); newClass.setIncluded(true); newClass.setInstanceVariables(getInstanceVariables()); newClass.setMethods(methods); if (isIncluded()) { newClass.setRubyClass(getRubyClass()); } else { newClass.setRubyClass(this); } return newClass; }
| 3,235,186
|
public RubyClass newIncludeClass(RubyModule superClass) { RubyClass newClass = new RubyClass(getRuby(), superClass); newClass.setIncluded(true); newClass.setInstanceVariables(getInstanceVariables()); newClass.setMethods(methods); if (isIncluded()) { newClass.setRubyClass(getRubyClass()); } else { newClass.setRubyClass(this); } return newClass; }
|
public RubyClass newIncludeClass(RubyModule superClass) { RubyClass newClass = new RubyClass(getRuby(), superClass); newClass.setIncluded(true); newClass.setInstanceVariables(getInstanceVariables()); newClass.setMethods(methods); if (isIncluded()) { newClass.setRubyClass(getRubyClass()); } else { newClass.setRubyClass(this); } return newClass; }
| 3,235,187
|
public RubyClass newIncludeClass(RubyModule superClass) { RubyClass newClass = new RubyClass(getRuby(), superClass); newClass.setIncluded(true); newClass.setInstanceVariables(getInstanceVariables()); newClass.setMethods(methods); if (isIncluded()) { newClass.setRubyClass(getRubyClass()); } else { newClass.setRubyClass(this); } return newClass; }
|
public RubyClass newIncludeClass(RubyModule superClass) { RubyClass newClass = new RubyClass(getRuby(), superClass); newClass.setIncluded(true); newClass.setInstanceVariables(getInstanceVariables()); newClass.setMethods(methods); if (isIncluded()) { newClass.setRubyClass(getRubyClass()); } else { newClass.setRubyClass(this); } return newClass; }
| 3,235,188
|
public RubyClass newIncludeClass(RubyModule superClass) { RubyClass newClass = new RubyClass(getRuby(), superClass); newClass.setIncluded(true); newClass.setInstanceVariables(getInstanceVariables()); newClass.setMethods(methods); if (isIncluded()) { newClass.setRubyClass(getRubyClass()); } else { newClass.setRubyClass(this); } return newClass; }
|
public RubyClass newIncludeClass(RubyModule superClass) { RubyClass newClass = new RubyClass(getRuby(), superClass); newClass.setIncluded(true); newClass.setInstanceVariables(getInstanceVariables()); newClass.setMethods(methods); if (isIncluded()) { newClass.setRubyClass(getRubyClass()); } else { newClass.setRubyClass(this); } return newClass; }
| 3,235,189
|
public RubyObject newMethod( RubyObject recv, RubyId id, RubyClass methodClass) { RubyClass originalClass = (RubyClass) this; RubyId originalId = id; GetMethodBodyResult gmbr = getMethodBody(id, 0); if (gmbr == null) { // printUndef(); return getRuby().getNil(); } while (gmbr.getBody() instanceof ZSuperNode) { gmbr = gmbr.getRecvClass().getSuperClass().getMethodBody(gmbr.getId(), 0); if (gmbr == null) { // printUndef(); return getRuby().getNil(); } } RubyMethod newMethod = new RubyMethod(getRuby(), methodClass); newMethod.setReceiverClass((RubyClass) gmbr.getRecvClass()); newMethod.setReceiver(recv); newMethod.setMethodId(gmbr.getId()); newMethod.setBodyNode(gmbr.getBody()); newMethod.setOriginalClass(originalClass); newMethod.setOriginalId(originalId); return newMethod; }
|
public RubyObject newMethod( RubyObject recv, RubyId id, RubyClass methodClass) { RubyClass originalClass = (RubyClass) this; RubyId originalId = id; GetMethodBodyResult gmbr = getMethodBody(id, 0); if (gmbr == null) { // printUndef(); return getRuby().getNil(); } while (gmbr.getBody() instanceof ZSuperNode) { gmbr = gmbr.getRecvClass().getSuperClass().getMethodBody(gmbr.getId(), 0); if (gmbr == null) { // printUndef(); return getRuby().getNil(); } } RubyMethod newMethod = new RubyMethod(getRuby(), methodClass); newMethod.setReceiverClass((RubyClass) gmbr.getRecvClass()); newMethod.setReceiver(recv); newMethod.setMethodId(gmbr.getId()); newMethod.setBodyNode(gmbr.getBody()); newMethod.setOriginalClass(originalClass); newMethod.setOriginalId(originalId); return newMethod; }
| 3,235,190
|
public RubyObject newMethod( RubyObject recv, RubyId id, RubyClass methodClass) { RubyClass originalClass = (RubyClass) this; RubyId originalId = id; GetMethodBodyResult gmbr = getMethodBody(id, 0); if (gmbr == null) { // printUndef(); return getRuby().getNil(); } while (gmbr.getBody() instanceof ZSuperNode) { gmbr = gmbr.getRecvClass().getSuperClass().getMethodBody(gmbr.getId(), 0); if (gmbr == null) { // printUndef(); return getRuby().getNil(); } } RubyMethod newMethod = new RubyMethod(getRuby(), methodClass); newMethod.setReceiverClass((RubyClass) gmbr.getRecvClass()); newMethod.setReceiver(recv); newMethod.setMethodId(gmbr.getId()); newMethod.setBodyNode(gmbr.getBody()); newMethod.setOriginalClass(originalClass); newMethod.setOriginalId(originalId); return newMethod; }
|
public RubyObject newMethod( RubyObject recv, RubyId id, RubyClass methodClass) { RubyClass originalClass = (RubyClass) this; RubyId originalId = id; GetMethodBodyResult gmbr = getMethodBody(id, 0); if (gmbr == null) { // printUndef(); return getRuby().getNil(); } while (gmbr.getBody() instanceof ZSuperNode) { gmbr = gmbr.getRecvClass().getSuperClass().getMethodBody(gmbr.getId(), 0); if (gmbr == null) { // printUndef(); return getRuby().getNil(); } } RubyMethod newMethod = new RubyMethod(getRuby(), methodClass); newMethod.setReceiverClass((RubyClass) gmbr.getRecvClass()); newMethod.setReceiver(recv); newMethod.setMethodId(gmbr.getId()); newMethod.setBodyNode(gmbr.getBody()); newMethod.setOriginalClass(originalClass); newMethod.setOriginalId(originalId); return newMethod; }
| 3,235,191
|
public RubyClass newSingletonClass() { RubyClass newClass = RubyClass.m_newClass(getRuby(), (RubyClass) this); newClass.setSingleton(true); return newClass; }
|
public RubyClass newSingletonClass() { RubyClass newClass = RubyClass.m_newClass(getRuby(), (RubyClass) this); newClass.setSingleton(true); return newClass; }
| 3,235,192
|
public RubyClass newSingletonClass() { RubyClass newClass = RubyClass.m_newClass(getRuby(), (RubyClass) this); newClass.setSingleton(true); return newClass; }
|
public RubyClass newSingletonClass() { RubyClass newClass = RubyClass.m_newClass(getRuby(), (RubyClass) this); newClass.setSingleton(true); return newClass; }
| 3,235,193
|
public RubyFixnum op_cmp(RubyObject obj) { if (this == obj) { return RubyFixnum.m_newFixnum(getRuby(), 0); } if (!(obj instanceof RubyModule)) { throw new RubyTypeException( getRuby(), "<=> requires Class or Module (" + getRubyClass().toName() + " given)"); } if (op_le(obj).isTrue()) { return RubyFixnum.m_newFixnum(getRuby(), -1); } return RubyFixnum.m_newFixnum(getRuby(), 1); }
|
public RubyFixnum op_cmp(RubyObject obj) { if (this == obj) { return RubyFixnum.m_newFixnum(getRuby(), 0); } if (!(obj instanceof RubyModule)) { throw new RubyTypeException( getRuby(), "<=> requires Class or Module (" + getRubyClass().toName() + " given)"); } if (op_le(obj).isTrue()) { return RubyFixnum.m_newFixnum(getRuby(), -1); } return RubyFixnum.m_newFixnum(getRuby(), 1); }
| 3,235,194
|
public RubyFixnum op_cmp(RubyObject obj) { if (this == obj) { return RubyFixnum.m_newFixnum(getRuby(), 0); } if (!(obj instanceof RubyModule)) { throw new RubyTypeException( getRuby(), "<=> requires Class or Module (" + getRubyClass().toName() + " given)"); } if (op_le(obj).isTrue()) { return RubyFixnum.m_newFixnum(getRuby(), -1); } return RubyFixnum.m_newFixnum(getRuby(), 1); }
|
public RubyFixnum op_cmp(RubyObject obj) { if (this == obj) { return RubyFixnum.m_newFixnum(getRuby(), 0); } if (!(obj instanceof RubyModule)) { throw new RubyTypeException( getRuby(), "<=> requires Class or Module (" + getRubyClass().toName() + " given)"); } if (op_le(obj).isTrue()) { return RubyFixnum.m_newFixnum(getRuby(), -1); } return RubyFixnum.m_newFixnum(getRuby(), 1); }
| 3,235,195
|
public RubyFixnum op_cmp(RubyObject obj) { if (this == obj) { return RubyFixnum.m_newFixnum(getRuby(), 0); } if (!(obj instanceof RubyModule)) { throw new RubyTypeException( getRuby(), "<=> requires Class or Module (" + getRubyClass().toName() + " given)"); } if (op_le(obj).isTrue()) { return RubyFixnum.m_newFixnum(getRuby(), -1); } return RubyFixnum.m_newFixnum(getRuby(), 1); }
|
public RubyFixnum op_cmp(RubyObject obj) { if (this == obj) { return RubyFixnum.m_newFixnum(getRuby(), 0); } if (!(obj instanceof RubyModule)) { throw new RubyTypeException( getRuby(), "<=> requires Class or Module (" + getRubyClass().toName() + " given)"); } if (op_le(obj).isTrue()) { return RubyFixnum.m_newFixnum(getRuby(), -1); } return RubyFixnum.m_newFixnum(getRuby(), 1); }
| 3,235,196
|
public RubyFixnum op_cmp(RubyObject obj) { if (this == obj) { return RubyFixnum.m_newFixnum(getRuby(), 0); } if (!(obj instanceof RubyModule)) { throw new RubyTypeException( getRuby(), "<=> requires Class or Module (" + getRubyClass().toName() + " given)"); } if (op_le(obj).isTrue()) { return RubyFixnum.m_newFixnum(getRuby(), -1); } return RubyFixnum.m_newFixnum(getRuby(), 1); }
|
public RubyFixnum op_cmp(RubyObject obj) { if (this == obj) { return RubyFixnum.m_newFixnum(getRuby(), 0); } if (!(obj instanceof RubyModule)) { throw new RubyTypeException( getRuby(), "<=> requires Class or Module (" + getRubyClass().toName() + " given)"); } if (op_le(obj).isTrue()) { return RubyFixnum.m_newFixnum(getRuby(), -1); } return RubyFixnum.m_newFixnum(getRuby(), 1); }
| 3,235,197
|
public RubyBoolean op_eqq(RubyObject obj) { return obj.m_kind_of(this); }
|
public RubyBoolean op_eqq(RubyObject obj) { return obj.m_kind_of(this); }
| 3,235,198
|
public RubyBoolean op_ge(RubyObject obj) { if (!(obj instanceof RubyModule)) { throw new RubyTypeException(getRuby(), "compared with non class/module"); } return ((RubyModule) obj).op_le(this); }
|
public RubyBoolean op_ge(RubyObject obj) { if (!(obj instanceof RubyModule)) { throw new RubyTypeException(getRuby(), "compared with non class/module"); } return ((RubyModule) obj).op_le(this); }
| 3,235,199
|
public RubyBoolean op_ge(RubyObject obj) { if (!(obj instanceof RubyModule)) { throw new RubyTypeException(getRuby(), "compared with non class/module"); } return ((RubyModule) obj).op_le(this); }
|
public RubyBoolean op_ge(RubyObject obj) { if (!(obj instanceof RubyModule)) { throw new RubyTypeException(getRuby(), "compared with non class/module"); } return ((RubyModule) obj).op_le(this); }
| 3,235,200
|
public RubyBoolean op_gt(RubyObject obj) { if (this == obj) { return getRuby().getFalse(); } return op_ge(obj); }
|
public RubyBoolean op_gt(RubyObject obj) { if (this == obj) { return getRuby().getFalse(); } return op_ge(obj); }
| 3,235,201
|
public RubyBoolean op_le(RubyObject obj) { if (!(obj instanceof RubyModule)) { throw new RubyTypeException(getRuby(), "compared with non class/module"); } RubyModule mod = this; while (mod != null) { if (mod.methods == ((RubyModule) obj).methods) { return getRuby().getTrue(); } mod = mod.getSuperClass(); } return getRuby().getFalse(); }
|
public RubyBoolean op_le(RubyObject obj) { if (!(obj instanceof RubyModule)) { throw new RubyTypeException(getRuby(), "compared with non class/module"); } RubyModule mod = this; while (mod != null) { if (mod.methods == ((RubyModule) obj).methods) { return getRuby().getTrue(); } mod = mod.getSuperClass(); } return getRuby().getFalse(); }
| 3,235,202
|
public RubyBoolean op_le(RubyObject obj) { if (!(obj instanceof RubyModule)) { throw new RubyTypeException(getRuby(), "compared with non class/module"); } RubyModule mod = this; while (mod != null) { if (mod.methods == ((RubyModule) obj).methods) { return getRuby().getTrue(); } mod = mod.getSuperClass(); } return getRuby().getFalse(); }
|
public RubyBoolean op_le(RubyObject obj) { if (!(obj instanceof RubyModule)) { throw new RubyTypeException(getRuby(), "compared with non class/module"); } RubyModule mod = this; while (mod != null) { if (mod.methods == ((RubyModule) obj).methods) { return getRuby().getTrue(); } mod = mod.getSuperClass(); } return getRuby().getFalse(); }
| 3,235,203
|
public RubyBoolean op_le(RubyObject obj) { if (!(obj instanceof RubyModule)) { throw new RubyTypeException(getRuby(), "compared with non class/module"); } RubyModule mod = this; while (mod != null) { if (mod.methods == ((RubyModule) obj).methods) { return getRuby().getTrue(); } mod = mod.getSuperClass(); } return getRuby().getFalse(); }
|
public RubyBoolean op_le(RubyObject obj) { if (!(obj instanceof RubyModule)) { throw new RubyTypeException(getRuby(), "compared with non class/module"); } RubyModule mod = this; while (mod != null) { if (mod.methods == ((RubyModule) obj).methods) { return getRuby().getTrue(); } mod = mod.getSuperClass(); } return getRuby().getFalse(); }
| 3,235,204
|
public RubyBoolean op_lt(RubyObject obj) { if (obj == this) { return getRuby().getFalse(); } return op_le(obj); }
|
public RubyBoolean op_lt(RubyObject obj) { if (obj == this) { return getRuby().getFalse(); } return op_le(obj); }
| 3,235,205
|
public RubyObject removeCvar(RubyObject name) { // Wrong Parameter ? RubyId id = getRuby().toId(name); if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } RubyObject value = (RubyObject) getInstanceVariables().remove(id); if (value != null) { return value; } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
|
public RubyObject removeCvar(RubyObject name) { // Wrong Parameter ? RubyId id = getRuby().toId(name); if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } RubyObject value = (RubyObject) getInstanceVariables().remove(id); if (value != null) { return value; } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
| 3,235,206
|
public RubyObject removeCvar(RubyObject name) { // Wrong Parameter ? RubyId id = getRuby().toId(name); if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } RubyObject value = (RubyObject) getInstanceVariables().remove(id); if (value != null) { return value; } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
|
public RubyObject removeCvar(RubyObject name) { // Wrong Parameter ? RubyId id = getRuby().toId(name); if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } RubyObject value = (RubyObject) getInstanceVariables().remove(id); if (value != null) { return value; } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
| 3,235,207
|
public RubyObject removeCvar(RubyObject name) { // Wrong Parameter ? RubyId id = getRuby().toId(name); if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } RubyObject value = (RubyObject) getInstanceVariables().remove(id); if (value != null) { return value; } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
|
public RubyObject removeCvar(RubyObject name) { // Wrong Parameter ? RubyId id = getRuby().toId(name); if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } RubyObject value = (RubyObject) getInstanceVariables().remove(id); if (value != null) { return value; } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
| 3,235,208
|
public RubyObject removeCvar(RubyObject name) { // Wrong Parameter ? RubyId id = getRuby().toId(name); if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } RubyObject value = (RubyObject) getInstanceVariables().remove(id); if (value != null) { return value; } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
|
public RubyObject removeCvar(RubyObject name) { // Wrong Parameter ? RubyId id = getRuby().toId(name); if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } RubyObject value = (RubyObject) getInstanceVariables().remove(id); if (value != null) { return value; } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
| 3,235,209
|
public RubyObject removeCvar(RubyObject name) { // Wrong Parameter ? RubyId id = getRuby().toId(name); if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } RubyObject value = (RubyObject) getInstanceVariables().remove(id); if (value != null) { return value; } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
|
public RubyObject removeCvar(RubyObject name) { // Wrong Parameter ? RubyId id = getRuby().toId(name); if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } RubyObject value = (RubyObject) getInstanceVariables().remove(id); if (value != null) { return value; } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
| 3,235,210
|
public RubyObject removeCvar(RubyObject name) { // Wrong Parameter ? RubyId id = getRuby().toId(name); if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } RubyObject value = (RubyObject) getInstanceVariables().remove(id); if (value != null) { return value; } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
|
public RubyObject removeCvar(RubyObject name) { // Wrong Parameter ? RubyId id = getRuby().toId(name); if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } RubyObject value = (RubyObject) getInstanceVariables().remove(id); if (value != null) { return value; } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
| 3,235,211
|
public RubyObject removeCvar(RubyObject name) { // Wrong Parameter ? RubyId id = getRuby().toId(name); if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } RubyObject value = (RubyObject) getInstanceVariables().remove(id); if (value != null) { return value; } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
|
public RubyObject removeCvar(RubyObject name) { // Wrong Parameter ? RubyId id = getRuby().toId(name); if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } RubyObject value = (RubyObject) getInstanceVariables().remove(id); if (value != null) { return value; } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
| 3,235,212
|
public RubyObject removeCvar(RubyObject name) { // Wrong Parameter ? RubyId id = getRuby().toId(name); if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } RubyObject value = (RubyObject) getInstanceVariables().remove(id); if (value != null) { return value; } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
|
public RubyObject removeCvar(RubyObject name) { // Wrong Parameter ? RubyId id = getRuby().toId(name); if (!id.isClassId()) { throw new RubyNameException(getRuby(), "wrong class variable name " + name); } if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't remove class variable"); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } RubyObject value = (RubyObject) getInstanceVariables().remove(id); if (value != null) { return value; } if (isClassVarDefined(id)) { throw new RubyNameException( getRuby(), "cannot remove " + id.toName() + " for " + toName()); } throw new RubyNameException( getRuby(), "class variable " + id.toName() + " not defined for " + toName()); }
| 3,235,213
|
public void removeMethod(RubyId methodId) { if (this == getRuby().getClasses().getObjectClass()) { getRuby().secure(4); } if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException(getRuby(), "Insecure: can't remove method"); } if (isFrozen()) { // rb_error_frozen("class/module"); } if (methods.remove(methodId) == null) { throw new RubyNameException( getRuby(), "method '" + methodId.toName() + "' not defined in " + toName()); } }
|
public void removeMethod(RubyId methodId) { if (this == getRuby().getClasses().getObjectClass()) { getRuby().secure(4); } if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException(getRuby(), "Insecure: can't remove method"); } if (isFrozen()) { // rb_error_frozen("class/module"); } if (methods.remove(methodId) == null) { throw new RubyNameException( getRuby(), "method '" + methodId.toName() + "' not defined in " + toName()); } }
| 3,235,214
|
public RubyModule remove_method(RubyObject name) { removeMethod(name.toId()); return this; }
|
public RubyModule remove_method(RubyObject name) { removeMethod(name.toId()); return this; }
| 3,235,215
|
public RubyModule remove_method(RubyObject name) { removeMethod(name.toId()); return this; }
|
public RubyModule remove_method(RubyObject name) { removeMethod(name.toId()); return this; }
| 3,235,216
|
public MethodNode searchMethod(RubyId id) { MethodNode body = (MethodNode) methods.get(id); if (body == null) { if (getSuperClass() != null) { return getSuperClass().searchMethod(id); } else { return null; } } else { body.setMethodOrigin(this); return body; } }
|
public MethodNode searchMethod(RubyId id) { MethodNode body = (MethodNode) methods.get(id); if (body == null) { if (getSuperClass() != null) { return getSuperClass().searchMethod(id); } else { return null; } } else { body.setMethodOrigin(this); return body; } }
| 3,235,217
|
protected void setAv(RubyId id, RubyObject value, boolean constant) { String dest = constant ? "constant" : "class variable"; if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException(getRuby(), "Insecure: can't set " + dest); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } if (constant && (getInstanceVariables().get(id) != null)) { //getRuby().warn("already initialized " + dest + " " + name); } if (getInstanceVariables() == null) { setInstanceVariables(new RubyHashMap()); } getInstanceVariables().put(id, value); }
|
protected void setAv(RubyId id, RubyObject value, boolean constant) { String dest = constant ? "constant" : "class variable"; if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException(getRuby(), "Insecure: can't set " + dest); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } if (constant && (getInstanceVariables().get(id) != null)) { //getRuby().warn("already initialized " + dest + " " + name); } if (getInstanceVariables() == null) { setInstanceVariables(new RubyHashMap()); } getInstanceVariables().put(id, value); }
| 3,235,218
|
protected void setAv(RubyId id, RubyObject value, boolean constant) { String dest = constant ? "constant" : "class variable"; if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException(getRuby(), "Insecure: can't set " + dest); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } if (constant && (getInstanceVariables().get(id) != null)) { //getRuby().warn("already initialized " + dest + " " + name); } if (getInstanceVariables() == null) { setInstanceVariables(new RubyHashMap()); } getInstanceVariables().put(id, value); }
|
protected void setAv(RubyId id, RubyObject value, boolean constant) { String dest = constant ? "constant" : "class variable"; if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException(getRuby(), "Insecure: can't set " + dest); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } if (constant && (getInstanceVariables().get(id) != null)) { //getRuby().warn("already initialized " + dest + " " + name); } if (getInstanceVariables() == null) { setInstanceVariables(new RubyHashMap()); } getInstanceVariables().put(id, value); }
| 3,235,219
|
protected void setAv(RubyId id, RubyObject value, boolean constant) { String dest = constant ? "constant" : "class variable"; if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException(getRuby(), "Insecure: can't set " + dest); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } if (constant && (getInstanceVariables().get(id) != null)) { //getRuby().warn("already initialized " + dest + " " + name); } if (getInstanceVariables() == null) { setInstanceVariables(new RubyHashMap()); } getInstanceVariables().put(id, value); }
|
protected void setAv(RubyId id, RubyObject value, boolean constant) { String dest = constant ? "constant" : "class variable"; if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException(getRuby(), "Insecure: can't set " + dest); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } if (constant && (getInstanceVariables().get(id) != null)) { //getRuby().warn("already initialized " + dest + " " + name); } if (getInstanceVariables() == null) { setInstanceVariables(new RubyHashMap()); } getInstanceVariables().put(id, value); }
| 3,235,220
|
protected void setAv(RubyId id, RubyObject value, boolean constant) { String dest = constant ? "constant" : "class variable"; if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException(getRuby(), "Insecure: can't set " + dest); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } if (constant && (getInstanceVariables().get(id) != null)) { //getRuby().warn("already initialized " + dest + " " + name); } if (getInstanceVariables() == null) { setInstanceVariables(new RubyHashMap()); } getInstanceVariables().put(id, value); }
|
protected void setAv(RubyId id, RubyObject value, boolean constant) { String dest = constant ? "constant" : "class variable"; if (!isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException(getRuby(), "Insecure: can't set " + dest); } if (isFrozen()) { throw new RubyFrozenException(getRuby(), "class/module"); } if (constant && (getInstanceVariables().get(id) != null)) { //getRuby().warn("already initialized " + dest + " " + name); } if (getInstanceVariables() == null) { setInstanceVariables(new RubyHashMap()); } getInstanceVariables().put(id, value); }
| 3,235,221
|
public void setClassPath(RubyModule under, String name) { RubyString value = null; if (under == getRuby().getClasses().getObjectClass()) { value = RubyString.m_newString(getRuby(), name); } else { value = (RubyString) under.getClassPath().m_dup(); value.m_cat("::"); value.m_cat(name); } getInstanceVariables().put(getRuby().intern("__classpath__"), value); }
|
public void setClassPath(RubyModule under, String name) { RubyString value = null; if (under == getRuby().getClasses().getObjectClass()) { value = RubyString.m_newString(getRuby(), name); } else { value = (RubyString) under.getClassPath().m_dup(); value.m_cat("::"); value.m_cat(name); } getInstanceVariables().put(getRuby().intern("__classpath__"), value); }
| 3,235,222
|
public void setClassPath(RubyModule under, String name) { RubyString value = null; if (under == getRuby().getClasses().getObjectClass()) { value = RubyString.m_newString(getRuby(), name); } else { value = (RubyString) under.getClassPath().m_dup(); value.m_cat("::"); value.m_cat(name); } getInstanceVariables().put(getRuby().intern("__classpath__"), value); }
|
public void setClassPath(RubyModule under, String name) { RubyString value = null; if (under == getRuby().getClasses().getObjectClass()) { value = RubyString.m_newString(getRuby(), name); } else { value = (RubyString) under.getClassPath().m_dup(); value.m_cat("::"); value.m_cat(name); } getInstanceVariables().put(getRuby().intern("__classpath__"), value); }
| 3,235,223
|
public void setClassPath(RubyModule under, String name) { RubyString value = null; if (under == getRuby().getClasses().getObjectClass()) { value = RubyString.m_newString(getRuby(), name); } else { value = (RubyString) under.getClassPath().m_dup(); value.m_cat("::"); value.m_cat(name); } getInstanceVariables().put(getRuby().intern("__classpath__"), value); }
|
public void setClassPath(RubyModule under, String name) { RubyString value = null; if (under == getRuby().getClasses().getObjectClass()) { value = RubyString.m_newString(getRuby(), name); } else { value = (RubyString) under.getClassPath().m_dup(); value.m_cat("::"); value.m_cat(name); } getInstanceVariables().put(getRuby().intern("__classpath__"), value); }
| 3,235,224
|
public void setClassVar(RubyId id, RubyObject value) { RubyModule tmp = this; while (tmp != null) { if (tmp.getInstanceVariables() != null && tmp.getInstanceVariables().get(id) != null) { if (tmp.isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't modify class variable"); } tmp.getInstanceVariables().put(id, value); } tmp = tmp.getSuperClass(); } throw new RubyNameException( getRuby(), "uninitialized class variable " + id.toName() + " in " + toName()); }
|
public void setClassVar(RubyId id, RubyObject value) { RubyModule tmp = this; while (tmp != null) { if (tmp.getInstanceVariables() != null && tmp.getInstanceVariables().get(id) != null) { if (tmp.isTaint() && getRuby().getSecurityLevel() >= 4) { throw new RubySecurityException( getRuby(), "Insecure: can't modify class variable"); } tmp.getInstanceVariables().put(id, value); } tmp = tmp.getSuperClass(); } throw new RubyNameException( getRuby(), "uninitialized class variable " + id.toName() + " in " + toName()); }
| 3,235,225
|
public void setConstant(RubyId id, RubyObject value) { setAv(id, value, true); }
|
public void setConstant(RubyId id, RubyObject value) { setAv(id, value, true); }
| 3,235,226
|
public void setIncluded(boolean included) { this.included = included; }
|
public void setIncluded(boolean included) { this.included = included; }
| 3,235,227
|
public void setMethodVisibility(RubyObject[] methods, int noex) { if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException( getRuby(), "Insecure: can't change method visibility"); } for (int i = 0; i < methods.length; i++) { exportMethod(methods[i].toId(), noex); } }
|
public void setMethodVisibility(RubyObject[] methods, int noex) { if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException( getRuby(), "Insecure: can't change method visibility"); } for (int i = 0; i < methods.length; i++) { exportMethod(methods[i].toId(), noex); } }
| 3,235,228
|
public void setMethodVisibility(RubyObject[] methods, int noex) { if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException( getRuby(), "Insecure: can't change method visibility"); } for (int i = 0; i < methods.length; i++) { exportMethod(methods[i].toId(), noex); } }
|
public void setMethodVisibility(RubyObject[] methods, int noex) { if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new RubySecurityException( getRuby(), "Insecure: can't change method visibility"); } for (int i = 0; i < methods.length; i++) { exportMethod(methods[i].toId(), noex); } }
| 3,235,229
|
public void setMethods(RubyMap methods) { this.methods = methods; }
|
public void setMethods(RubyMap methods) { this.methods = methods; }
| 3,235,230
|
public void setName(RubyId id) { getInstanceVariables().put(getRuby().intern("__classid__"), id); }
|
public void setName(RubyId id) { getInstanceVariables().put(getRuby().intern("__classid__"), id); }
| 3,235,231
|
public void setSingleton(boolean singleton) { this.singleton = singleton; }
|
public void setSingleton(boolean singleton) { this.singleton = singleton; }
| 3,235,232
|
public void setSuperClass(RubyModule superClass) { this.superClass = superClass; }
|
public void setSuperClass(RubyModule superClass) { this.superClass = superClass; }
| 3,235,233
|
protected void testFrozen() { String desc = "something(?!)"; if (isFrozen()) { if (isSingleton()) { desc = "object"; } else { if (isIncluded() || isModule()) { desc = "module"; } else if (isClass()) { desc = "class"; } } throw new RubyFrozenException(getRuby(), desc); } }
|
protected void testFrozen() { String desc = "something(?!)"; if (isFrozen()) { if (isSingleton()) { desc = "object"; } else { if (isIncluded() || isModule()) { desc = "module"; } else if (isClass()) { desc = "class"; } } throw new RubyFrozenException(getRuby(), desc); } }
| 3,235,234
|
public String toName() { if (this == getRuby().getClasses().getNilClass()) { return "nil"; } if (this == getRuby().getClasses().getTrueClass()) { return "true"; } if (this == getRuby().getClasses().getFalseClass()) { return "false"; } return ((RubyString) getClassPath()).getValue(); }
|
public String toName() { if (this == getRuby().getClasses().getNilClass()) { return "nil"; } if (this == getRuby().getClasses().getTrueClass()) { return "true"; } if (this == getRuby().getClasses().getFalseClass()) { return "false"; } return ((RubyString) getClassPath()).getValue(); }
| 3,235,235
|
public String toName() { if (this == getRuby().getClasses().getNilClass()) { return "nil"; } if (this == getRuby().getClasses().getTrueClass()) { return "true"; } if (this == getRuby().getClasses().getFalseClass()) { return "false"; } return ((RubyString) getClassPath()).getValue(); }
|
public String toName() { if (this == getRuby().getClasses().getNilClass()) { return "nil"; } if (this == getRuby().getClasses().getTrueClass()) { return "true"; } if (this == getRuby().getClasses().getFalseClass()) { return "false"; } return ((RubyString) getClassPath()).getValue(); }
| 3,235,236
|
public void undef(RubyId id) { if (this == getRuby().getClasses().getObjectClass()) { getRuby().secure(4); } if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new SecurityException("Insecure: can't undef"); } testFrozen(); if (id == getRuby().intern("__id__") || id == getRuby().intern("__send__")) { /*rb_warn("undefining `%s' may cause serious problem", rb_id2name( id ) );*/ } MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { String s0 = " class"; RubyModule c = this; if (c.isSingleton()) { RubyObject obj = getInstanceVar("__attached__"); if (obj instanceof RubyModule) { c = (RubyModule) obj; s0 = ""; } } else if (c.isModule()) { s0 = " module"; } throw new RubyNameException( getRuby(), "undefined method " + id.toName() + " for" + s0 + " '" + c.toName() + "'"); } addMethod(id, null, Constants.NOEX_PUBLIC); }
|
public void undef(RubyId id) { if (this == getRuby().getClasses().getObjectClass()) { getRuby().secure(4); } if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new SecurityException("Insecure: can't undef"); } testFrozen(); if (id == getRuby().intern("__id__") || id == getRuby().intern("__send__")) { /*rb_warn("undefining `%s' may cause serious problem", rb_id2name( id ) );*/ } MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { String s0 = " class"; RubyModule c = this; if (c.isSingleton()) { RubyObject obj = getInstanceVar("__attached__"); if (obj instanceof RubyModule) { c = (RubyModule) obj; s0 = ""; } } else if (c.isModule()) { s0 = " module"; } throw new RubyNameException( getRuby(), "undefined method " + id.toName() + " for" + s0 + " '" + c.toName() + "'"); } addMethod(id, null, Constants.NOEX_PUBLIC); }
| 3,235,237
|
public void undef(RubyId id) { if (this == getRuby().getClasses().getObjectClass()) { getRuby().secure(4); } if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new SecurityException("Insecure: can't undef"); } testFrozen(); if (id == getRuby().intern("__id__") || id == getRuby().intern("__send__")) { /*rb_warn("undefining `%s' may cause serious problem", rb_id2name( id ) );*/ } MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { String s0 = " class"; RubyModule c = this; if (c.isSingleton()) { RubyObject obj = getInstanceVar("__attached__"); if (obj instanceof RubyModule) { c = (RubyModule) obj; s0 = ""; } } else if (c.isModule()) { s0 = " module"; } throw new RubyNameException( getRuby(), "undefined method " + id.toName() + " for" + s0 + " '" + c.toName() + "'"); } addMethod(id, null, Constants.NOEX_PUBLIC); }
|
public void undef(RubyId id) { if (this == getRuby().getClasses().getObjectClass()) { getRuby().secure(4); } if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new SecurityException("Insecure: can't undef"); } testFrozen(); if (id == getRuby().intern("__id__") || id == getRuby().intern("__send__")) { /*rb_warn("undefining `%s' may cause serious problem", rb_id2name( id ) );*/ } MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { String s0 = " class"; RubyModule c = this; if (c.isSingleton()) { RubyObject obj = getInstanceVar("__attached__"); if (obj instanceof RubyModule) { c = (RubyModule) obj; s0 = ""; } } else if (c.isModule()) { s0 = " module"; } throw new RubyNameException( getRuby(), "undefined method " + id.toName() + " for" + s0 + " '" + c.toName() + "'"); } addMethod(id, null, Constants.NOEX_PUBLIC); }
| 3,235,238
|
public void undef(RubyId id) { if (this == getRuby().getClasses().getObjectClass()) { getRuby().secure(4); } if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new SecurityException("Insecure: can't undef"); } testFrozen(); if (id == getRuby().intern("__id__") || id == getRuby().intern("__send__")) { /*rb_warn("undefining `%s' may cause serious problem", rb_id2name( id ) );*/ } MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { String s0 = " class"; RubyModule c = this; if (c.isSingleton()) { RubyObject obj = getInstanceVar("__attached__"); if (obj instanceof RubyModule) { c = (RubyModule) obj; s0 = ""; } } else if (c.isModule()) { s0 = " module"; } throw new RubyNameException( getRuby(), "undefined method " + id.toName() + " for" + s0 + " '" + c.toName() + "'"); } addMethod(id, null, Constants.NOEX_PUBLIC); }
|
public void undef(RubyId id) { if (this == getRuby().getClasses().getObjectClass()) { getRuby().secure(4); } if (getRuby().getSecurityLevel() >= 4 && !isTaint()) { throw new SecurityException("Insecure: can't undef"); } testFrozen(); if (id == getRuby().intern("__id__") || id == getRuby().intern("__send__")) { /*rb_warn("undefining `%s' may cause serious problem", rb_id2name( id ) );*/ } MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { String s0 = " class"; RubyModule c = this; if (c.isSingleton()) { RubyObject obj = getInstanceVar("__attached__"); if (obj instanceof RubyModule) { c = (RubyModule) obj; s0 = ""; } } else if (c.isModule()) { s0 = " module"; } throw new RubyNameException( getRuby(), "undefined method " + id.toName() + " for" + s0 + " '" + c.toName() + "'"); } addMethod(id, null, Constants.NOEX_PUBLIC); }
| 3,235,239
|
public void undefMethod(String name) { addMethod(getRuby().intern(name), null, Constants.NOEX_UNDEF); }
|
public void undefMethod(String name) { addMethod(getRuby().intern(name), null, Constants.NOEX_UNDEF); }
| 3,235,240
|
public RubyModule undef_method(RubyObject name) { undef(name.toId()); return this; }
|
public RubyModule undef_method(RubyObject name) { undef(name.toId()); return this; }
| 3,235,241
|
public RubyModule undef_method(RubyObject name) { undef(name.toId()); return this; }
|
public RubyModule undef_method(RubyObject name) { undef(name.toId()); return this; }
| 3,235,242
|
public OptionalGroup(int argCount) { super(0, ArgType_GROUP); setOptional(subordinateArgs); }
|
public OptionalGroup(int argCount) { super(0, ArgType_GROUP); setOptional(argCount); }
| 3,235,243
|
public IObject fillIObject( IObject obj, ReverseModelMapper mapper) { if ( obj instanceof Dataset) { Dataset d = (Dataset) obj; if (super.fill(d)) { d.setName(this.getName()); d.setDescription(this.getDescription()); if (this.getImages() != null) { for (Iterator it = this.getImages().iterator(); it.hasNext();) { ImageData i = (ImageData) it.next(); d.linkImage((Image) mapper.map(i)); } } if (this.getProjects() != null) { for (Iterator it = this.getProjects().iterator(); it.hasNext();) { ProjectData p = (ProjectData) it.next(); d.linkProject((Project) mapper.map(p)); } } if (this.getAnnotations() != null) { for (Iterator it = this.getAnnotations().iterator(); it.hasNext();) { AnnotationData ann = (AnnotationData) it.next(); d.addToAnnotations( (DatasetAnnotation) mapper.map(ann)); } } } return d; } else { throw new IllegalArgumentException( "DatasetData can only fill Dataset."); } }
|
public IObject fillIObject( IObject obj, ReverseModelMapper mapper) { if ( obj instanceof Dataset) { Dataset d = (Dataset) obj; if (super.fill(d)) { d.setName(this.getName()); d.setDescription(this.getDescription()); if (this.getImages() != null) { for (Iterator it = this.getImages().iterator(); it.hasNext();) { ImageData i = (ImageData) it.next(); d.linkImage((Image) mapper.map(i)); } } if (this.getProjects() != null) { for (Iterator it = this.getProjects().iterator(); it.hasNext();) { ProjectData p = (ProjectData) it.next(); d.linkProject((Project) mapper.map(p)); } } if (this.getAnnotations() != null) { for (Iterator it = this.getAnnotations().iterator(); it.hasNext();) { AnnotationData ann = (AnnotationData) it.next(); d.addToAnnotations( (DatasetAnnotation) mapper.map(ann)); } } } return d; } else { throw new IllegalArgumentException( "DatasetData can only fill Dataset."); } }
| 3,235,244
|
public IObject fillIObject( IObject obj, ReverseModelMapper mapper) { if ( obj instanceof Dataset) { Dataset d = (Dataset) obj; if (super.fill(d)) { d.setName(this.getName()); d.setDescription(this.getDescription()); if (this.getImages() != null) { for (Iterator it = this.getImages().iterator(); it.hasNext();) { ImageData i = (ImageData) it.next(); d.linkImage((Image) mapper.map(i)); } } if (this.getProjects() != null) { for (Iterator it = this.getProjects().iterator(); it.hasNext();) { ProjectData p = (ProjectData) it.next(); d.linkProject((Project) mapper.map(p)); } } if (this.getAnnotations() != null) { for (Iterator it = this.getAnnotations().iterator(); it.hasNext();) { AnnotationData ann = (AnnotationData) it.next(); d.addToAnnotations( (DatasetAnnotation) mapper.map(ann)); } } } return d; } else { throw new IllegalArgumentException( "DatasetData can only fill Dataset."); } }
|
public IObject fillIObject( IObject obj, ReverseModelMapper mapper) { if ( obj instanceof Dataset) { Dataset d = (Dataset) obj; if (super.fill(d)) { d.setName(this.getName()); d.setDescription(this.getDescription()); if (this.getImages() != null) { for (Iterator it = this.getImages().iterator(); it.hasNext();) { ImageData i = (ImageData) it.next(); d.linkImage((Image) mapper.map(i)); } } if (this.getProjects() != null) { for (Iterator it = this.getProjects().iterator(); it.hasNext();) { ProjectData p = (ProjectData) it.next(); d.linkProject((Project) mapper.map(p)); } } if (this.getAnnotations() != null) { for (Iterator it = this.getAnnotations().iterator(); it.hasNext();) { AnnotationData ann = (AnnotationData) it.next(); d.addToAnnotations( (DatasetAnnotation) mapper.map(ann)); } } } return d; } else { throw new IllegalArgumentException( "DatasetData can only fill Dataset."); } }
| 3,235,245
|
public void loadPlugins() { // Add presence and message listeners // we listen for these to force open a 1-1 peer chat window from other operators if // one isn't already open PacketFilter workspaceMessageFilter = new PacketTypeFilter(Message.class); // Add the packetListener to this instance SparkManager.getSessionManager().getConnection().addPacketListener(this, workspaceMessageFilter); // Make presence available to anonymous requests, if from anonymous user in the system. PacketListener workspacePresenceListener = new PacketListener() { public void processPacket(Packet packet) { Presence presence = (Presence)packet; if (presence != null && presence.getProperty("anonymous") != null) { boolean isAvailable = statusBox.getPresence().getMode() == Presence.Mode.available; Presence reply = new Presence(Presence.Type.available); if (!isAvailable) { reply.setType(Presence.Type.unavailable); } reply.setTo(presence.getFrom()); SparkManager.getSessionManager().getConnection().sendPacket(reply); } } }; SparkManager.getSessionManager().getConnection().addPacketListener(workspacePresenceListener, new PacketTypeFilter(Presence.class)); // Send Available status final Presence presence = SparkManager.getWorkspace().getStatusBar().getPresence(); SparkManager.getSessionManager().changePresence(presence); // Load Plugins SwingWorker worker = new SwingWorker() { public Object construct() { try { Thread.sleep(5000); } catch (InterruptedException e) { Log.error("Unable to sleep thread.", e); } return "ok"; } public void finished() { final PluginManager pluginManager = PluginManager.getInstance(); pluginManager.loadPlugins(); pluginManager.initializePlugins(); } }; worker.start(); int numberOfMillisecondsInTheFuture = 10000; // 5 sec Date timeToRun = new Date(System.currentTimeMillis() + numberOfMillisecondsInTheFuture); Timer timer = new Timer(); timer.schedule(new TimerTask() { public void run() { SwingUtilities.invokeLater(new Runnable() { public void run() { final Iterator offlineMessage = offlineMessages.iterator(); while (offlineMessage.hasNext()) { Message offline = (Message)offlineMessage.next(); handleOfflineMessage(offline); } } }); } }, timeToRun); }
|
public void loadPlugins() { // Add presence and message listeners // we listen for these to force open a 1-1 peer chat window from other operators if // one isn't already open PacketFilter workspaceMessageFilter = new PacketTypeFilter(Message.class); // Add the packetListener to this instance SparkManager.getSessionManager().getConnection().addPacketListener(this, workspaceMessageFilter); // Make presence available to anonymous requests, if from anonymous user in the system. PacketListener workspacePresenceListener = new PacketListener() { public void processPacket(Packet packet) { Presence presence = (Presence)packet; if (presence != null && presence.getProperty("anonymous") != null) { boolean isAvailable = statusBox.getPresence().getMode() == Presence.Mode.available; Presence reply = new Presence(Presence.Type.available); if (!isAvailable) { reply.setType(Presence.Type.unavailable); } reply.setTo(presence.getFrom()); SparkManager.getSessionManager().getConnection().sendPacket(reply); } } }; SparkManager.getSessionManager().getConnection().addPacketListener(workspacePresenceListener, new PacketTypeFilter(Presence.class)); // Send Available status final Presence presence = SparkManager.getWorkspace().getStatusBar().getPresence(); SparkManager.getSessionManager().changePresence(presence); // Load Plugins SwingWorker worker = new SwingWorker() { public Object construct() { try { Thread.sleep(2000); } catch (InterruptedException e) { Log.error("Unable to sleep thread.", e); } return "ok"; } public void finished() { final PluginManager pluginManager = PluginManager.getInstance(); pluginManager.loadPlugins(); pluginManager.initializePlugins(); } }; worker.start(); int numberOfMillisecondsInTheFuture = 10000; // 5 sec Date timeToRun = new Date(System.currentTimeMillis() + numberOfMillisecondsInTheFuture); Timer timer = new Timer(); timer.schedule(new TimerTask() { public void run() { SwingUtilities.invokeLater(new Runnable() { public void run() { final Iterator offlineMessage = offlineMessages.iterator(); while (offlineMessage.hasNext()) { Message offline = (Message)offlineMessage.next(); handleOfflineMessage(offline); } } }); } }, timeToRun); }
| 3,235,246
|
public Object construct() { try { Thread.sleep(5000); } catch (InterruptedException e) { Log.error("Unable to sleep thread.", e); } return "ok"; }
|
public Object construct() { try { Thread.sleep(2000); } catch (InterruptedException e) { Log.error("Unable to sleep thread.", e); } return "ok"; }
| 3,235,247
|
protected Integer getCount( String countName ) { Object count = null; if (! nullDetails() && countName != null && getDetails().getCounts() != null) count = getDetails().getCounts().get( countName ); if ( count instanceof Integer ) return (Integer) count; return null; }
|
protected Long getCount( String countName ) { Object count = null; if (! nullDetails() && countName != null && getDetails().getCounts() != null) count = getDetails().getCounts().get( countName ); if ( count instanceof Integer ) return (Integer) count; return null; }
| 3,235,248
|
protected Integer getCount( String countName ) { Object count = null; if (! nullDetails() && countName != null && getDetails().getCounts() != null) count = getDetails().getCounts().get( countName ); if ( count instanceof Integer ) return (Integer) count; return null; }
|
protected Integer getCount( String countName ) { Object count = null; if (! nullDetails() && countName != null && getDetails().getCounts() != null) count = getDetails().getCounts().get( countName ); if ( count instanceof Integer ) return (Integer) count; return null; }
| 3,235,249
|
public BrowserCamera(BrowserTopModel model, PCamera c) { if(model == null || c == null) { throw new NullPointerException("Null parameters passed to " + "BrowserCamera(model,camera)"); } this.model = model; this.camera = c; camera.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { // oh, this is a ticky-tack hack right here if(e.getPropertyName().equals("viewTransform")) { System.err.println(camera.getViewScale()); System.err.println("offset="+camera.getViewBounds().getX()+ ","+camera.getViewBounds().getY()); double x = camera.getViewBounds().getX(); double y = camera.getViewBounds().getY(); double extentX = camera.getViewBounds().getWidth(); double extentY = camera.getViewBounds().getHeight(); double width = activeRegion.getWidth(); double height = activeRegion.getHeight(); for(Iterator iter = boundsListeners.iterator(); iter.hasNext();) { CameraListener listener = (CameraListener)iter.next(); listener.cameraBoundsChanged(x,y,extentX,extentY, width,height); } } } }); model.addModelListener(this); init(); cameraResized(cameraBounds); }
|
public BrowserCamera(BrowserTopModel model, PCamera c) { if(model == null || c == null) { throw new NullPointerException("Null parameters passed to " + "BrowserCamera(model,camera)"); } this.model = model; this.camera = c; camera.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { // oh, this is a ticky-tack hack right here if(e.getPropertyName().equals("viewTransform")) { System.err.println(camera.getViewScale()); System.err.println("offset="+camera.getViewBounds().getX()+ ","+camera.getViewBounds().getY()); double x = camera.getViewBounds().getX(); double y = camera.getViewBounds().getY(); double extentX = camera.getViewBounds().getWidth(); double extentY = camera.getViewBounds().getHeight(); double width = activeRegion.getWidth(); double height = activeRegion.getHeight(); for(Iterator iter = boundsListeners.iterator(); iter.hasNext();) { CameraListener listener = (CameraListener)iter.next(); listener.cameraBoundsChanged(x,y,extentX,extentY, width,height); } } } }); model.addModelListener(this); init(); cameraResized(cameraBounds); }
| 3,235,250
|
public void propertyChange(PropertyChangeEvent e) { // oh, this is a ticky-tack hack right here if(e.getPropertyName().equals("viewTransform")) { System.err.println(camera.getViewScale()); System.err.println("offset="+camera.getViewBounds().getX()+ ","+camera.getViewBounds().getY()); double x = camera.getViewBounds().getX(); double y = camera.getViewBounds().getY(); double extentX = camera.getViewBounds().getWidth(); double extentY = camera.getViewBounds().getHeight(); double width = activeRegion.getWidth(); double height = activeRegion.getHeight(); for(Iterator iter = boundsListeners.iterator(); iter.hasNext();) { CameraListener listener = (CameraListener)iter.next(); listener.cameraBoundsChanged(x,y,extentX,extentY, width,height); } } }
|
public void propertyChange(PropertyChangeEvent e) { // oh, this is a ticky-tack hack right here if(e.getPropertyName().equals("viewTransform")) { System.err.println(camera.getViewScale()); System.err.println("offset="+camera.getViewBounds().getX()+ ","+camera.getViewBounds().getY()); double x = camera.getViewBounds().getX(); double y = camera.getViewBounds().getY(); double extentX = camera.getViewBounds().getWidth(); double extentY = camera.getViewBounds().getHeight(); double width = activeRegion.getWidth(); double height = activeRegion.getHeight(); for(Iterator iter = boundsListeners.iterator(); iter.hasNext();) { CameraListener listener = (CameraListener)iter.next(); listener.cameraBoundsChanged(x,y,extentX,extentY, width,height); } } }
| 3,235,251
|
public void setY(double value) { camera.translateView(getY()-value,0); }
|
public void setY(double value) { System.err.println("setY: "+value); camera.translateView(0,getY()-value); }
| 3,235,253
|
private void dispatch() { // grab the first event posted AgentEvent e = (AgentEvent) eventQueue.removeLast(); Class eventClass = e.getClass(); LinkedList list = (LinkedList) deMultiplexTable.get(eventClass); ListIterator i = list.listIterator(); while (i.hasNext()) { AgentEventListener listener = (AgentEventListener) i.next(); if (e.getSource() != listener) listener.eventFired(e); } }
|
private void dispatch() { // grab the first event posted AgentEvent e = (AgentEvent) eventQueue.removeLast(); Class eventClass = e.getClass(); LinkedList list = (LinkedList) deMultiplexTable.get(eventClass); ListIterator i = list.listIterator(); while (i.hasNext()) { AgentEventListener listener = (AgentEventListener) i.next(); if (e.getSource() != listener) listener.eventFired(e); } }
| 3,235,255
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.