@Override public String toString() { return "Name: " + getName(); } }
@Override public List<Variable<Object>> getVariableList() { List<Variable<Object>> attrs = super.getVariableList(); attrs.add(new VariableEntry<>("mesg", getMessage())); IRubyObject backtrace = getBacktrace(); attrs.add(new VariableEntry<>("bt", backtrace)); return attrs; }
@Override public List<Variable<Object>> getVariableList() { List<Variable<Object>> attrs = super.getVariableList(); attrs.add(new VariableEntry<>("mesg", getMessage())); IRubyObject backtrace = getBacktrace(); attrs.add(new VariableEntry<>("bt", backtrace)); return attrs; }
@Override public String toString() { return "Name: " + getName(); } }
@Override public void marshalTo(Ruby runtime, Object obj, RubyClass type, MarshalStream marshalStream) throws IOException { RubyRange range = (RubyRange) obj; marshalStream.registerLinkTarget(range); List<Variable<Object>> attrs = range.getVariableList(); attrs.add(new VariableEntry<Object>("begini", range.begin)); attrs.add(new VariableEntry<Object>("endi", range.end)); attrs.add(new VariableEntry<Object>("excl", range.isExclusive ? runtime.getTrue() : runtime.getFalse())); marshalStream.dumpVariables(attrs); }
@Override public String toString() { return "Name: " + getName(); } }
@Override public void marshalTo(Ruby runtime, Object obj, RubyClass type, MarshalStream marshalStream) throws IOException { RubySystemCallError exc = (RubySystemCallError) obj; marshalStream.registerLinkTarget(exc); List<Variable<Object>> attrs = exc.getVariableList(); attrs.add(new VariableEntry<Object>( "mesg", exc.message == null ? runtime.getNil() : exc.message)); attrs.add(new VariableEntry<Object>("errno", exc.errno)); attrs.add(new VariableEntry<Object>("bt", exc.getBacktrace())); marshalStream.dumpVariables(attrs); }
@Override public String toString() { return "Name: " + getName(); } }
public void marshalTo(Ruby runtime, Object obj, RubyClass type, MarshalStream marshalStream) throws IOException { RubyRange range = (RubyRange)obj; marshalStream.registerLinkTarget(range); List<Variable<Object>> attrs = range.getVariableList(); attrs.add(new VariableEntry<Object>("begin", range.begin)); attrs.add(new VariableEntry<Object>("end", range.end)); attrs.add(new VariableEntry<Object>("excl", range.isExclusive ? runtime.getTrue() : runtime.getFalse())); marshalStream.dumpVariables(attrs); }
public void marshalTo(Ruby runtime, Object obj, RubyClass type, MarshalStream marshalStream) throws IOException { RubySystemCallError exc = (RubySystemCallError) obj; marshalStream.registerLinkTarget(exc); List<Variable<Object>> attrs = exc.getVariableList(); attrs.add(new VariableEntry<Object>( "mesg", exc.message == null ? runtime.getNil() : exc.message)); attrs.add(new VariableEntry<Object>("errno", exc.errno)); attrs.add(new VariableEntry<Object>("bt", exc.getBacktrace())); marshalStream.dumpVariables(attrs); }
@Override public void marshalTo(Ruby runtime, Object obj, RubyClass type, MarshalStream marshalStream) throws IOException { RubyRange range = (RubyRange) obj; marshalStream.registerLinkTarget(range); List<Variable<Object>> attrs = range.getVariableList(); attrs.add(new VariableEntry<Object>("begini", range.begin)); attrs.add(new VariableEntry<Object>("endi", range.end)); attrs.add(new VariableEntry<Object>("excl", range.isExclusive ? runtime.getTrue() : runtime.getFalse())); marshalStream.dumpVariables(attrs); }
@Override public void marshalTo(Ruby runtime, Object obj, RubyClass type, MarshalStream marshalStream) throws IOException { RubySystemCallError exc = (RubySystemCallError) obj; marshalStream.registerLinkTarget(exc); List<Variable<Object>> attrs = exc.getVariableList(); attrs.add(new VariableEntry<Object>( "mesg", exc.message == null ? runtime.getNil() : exc.message)); attrs.add(new VariableEntry<Object>("errno", exc.errno)); attrs.add(new VariableEntry<Object>("bt", exc.getBacktrace())); marshalStream.dumpVariables(attrs); }
public void marshalTo(Ruby runtime, Object obj, RubyClass type, MarshalStream marshalStream) throws IOException { RubyRange range = (RubyRange)obj; marshalStream.registerLinkTarget(range); List<Variable<Object>> attrs = range.getVariableList(); attrs.add(new VariableEntry<Object>("begin", range.begin)); attrs.add(new VariableEntry<Object>("end", range.end)); attrs.add(new VariableEntry<Object>("excl", range.isExclusive ? runtime.getTrue() : runtime.getFalse())); marshalStream.dumpVariables(attrs); }
public void marshalTo(Ruby runtime, Object obj, RubyClass type, MarshalStream marshalStream) throws IOException { RubySystemCallError exc = (RubySystemCallError) obj; marshalStream.registerLinkTarget(exc); List<Variable<Object>> attrs = exc.getVariableList(); attrs.add(new VariableEntry<Object>( "mesg", exc.message == null ? runtime.getNil() : exc.message)); attrs.add(new VariableEntry<Object>("errno", exc.errno)); attrs.add(new VariableEntry<Object>("bt", exc.getBacktrace())); marshalStream.dumpVariables(attrs); }
/** * Gets a list of all variables in this object. */ @Override public List<Variable<Object>> getVariableList() { Map<String, VariableAccessor> ivarAccessors = metaClass.getVariableAccessorsForRead(); ArrayList<Variable<Object>> list = new ArrayList<>(ivarAccessors.size()); for (Map.Entry<String, VariableAccessor> entry : ivarAccessors.entrySet()) { Object value = entry.getValue().get(this); if (value == null) continue; list.add(new VariableEntry<>(entry.getKey(), value)); } return list; }
/** * Gets a list of all variables in this object. */ // TODO: must override in RubyModule to pick up constants public List<Variable<Object>> getVariableList() { Map<String, VariableAccessor> ivarAccessors = metaClass.getVariableAccessorsForRead(); ArrayList<Variable<Object>> list = new ArrayList<Variable<Object>>(); for (Map.Entry<String, VariableAccessor> entry : ivarAccessors.entrySet()) { Object value = entry.getValue().get(this); if (value == null) continue; list.add(new VariableEntry<Object>(entry.getKey(), value)); } return list; }
@Override public void marshalTo(Ruby runtime, Object obj, RubyClass type, MarshalStream marshalStream) throws IOException { RubyException exc = (RubyException)obj; marshalStream.registerLinkTarget(exc); List<Variable<Object>> attrs = exc.getVariableList(); attrs.add(new VariableEntry<Object>("mesg", exc.getMessage())); attrs.add(new VariableEntry<Object>("bt", exc.getBacktrace())); marshalStream.dumpVariables(attrs); }
@Override public void marshalTo(Ruby runtime, Object obj, RubyClass type, MarshalStream marshalStream) throws IOException { RubyException exc = (RubyException)obj; marshalStream.registerLinkTarget(exc); List<Variable<Object>> attrs = exc.getVariableList(); attrs.add(new VariableEntry<Object>("mesg", exc.getMessage())); attrs.add(new VariableEntry<Object>("bt", exc.getBacktrace())); marshalStream.dumpVariables(attrs); }
public void marshalTo(Ruby runtime, Object obj, RubyClass type, MarshalStream marshalStream) throws IOException { RubyException exc = (RubyException)obj; marshalStream.registerLinkTarget(exc); List<Variable<Object>> attrs = exc.getVariableList(); attrs.add(new VariableEntry<Object>( "mesg", exc.message == null ? runtime.getNil() : exc.message)); attrs.add(new VariableEntry<Object>("bt", exc.getBacktrace())); marshalStream.dumpVariables(attrs); }
public void marshalTo(Ruby runtime, Object obj, RubyClass type, MarshalStream marshalStream) throws IOException { RubyException exc = (RubyException)obj; marshalStream.registerLinkTarget(exc); List<Variable<Object>> attrs = exc.getVariableList(); attrs.add(new VariableEntry<Object>( "mesg", exc.message == null ? runtime.getNil() : exc.message)); attrs.add(new VariableEntry<Object>("bt", exc.getBacktrace())); marshalStream.dumpVariables(attrs); }