/** * Deserialization proceeds as follows: * * <ol> * <li>Deserialize the object instance. It will have null metaClass and * varTable fields.</li> * <li>Deserialize the name of the object's class, and retrieve class from a * thread-local JRuby instance.</li> * <li>Retrieve each variable in turn, re-assigning them by name.</li> * </ol> * * @see RubyBasicObject#writeObject(java.io.ObjectOutputStream) */ private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { Ruby ruby = Ruby.getThreadLocalRuntime(); if (ruby == null) { throw new IOException("No thread-local org.jruby.Ruby available; can't deserialize Ruby object. Set with Ruby#setThreadLocalRuntime."); } ois.defaultReadObject(); metaClass = (RubyClass)ruby.getClassFromPath(ois.readUTF()); metaClass.getVariableTableManager().deserializeVariables(this, ois); }
/** * Deserialization proceeds as follows: * * <ol> * <li>Deserialize the object instance. It will have null metaClass and * varTable fields.</li> * <li>Deserialize the name of the object's class, and retrieve class from a * thread-local JRuby instance.</li> * <li>Retrieve each variable in turn, re-assigning them by name.</li> * </ol> * * @see RubyBasicObject#writeObject(java.io.ObjectOutputStream) */ private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { Ruby ruby = Ruby.getThreadLocalRuntime(); if (ruby == null) { throw new IOException("No thread-local org.jruby.Ruby available; can't deserialize Ruby object. Set with Ruby#setThreadLocalRuntime."); } ois.defaultReadObject(); metaClass = (RubyClass)ruby.getClassFromPath(ois.readUTF()); metaClass.getVariableTableManager().deserializeVariables(this, ois); }
/** * Deserialization proceeds as follows: * * <ol> * <li>Deserialize the object instance. It will have null metaClass and * varTable fields.</li> * <li>Deserialize the name of the object's class, and retrieve class from a * thread-local JRuby instance.</li> * <li>Retrieve each variable in turn, re-assigning them by name.</li> * </ol> * * @see RubyBasicObject#writeObject(java.io.ObjectOutputStream) */ private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { Ruby ruby = Ruby.getThreadLocalRuntime(); if (ruby == null) { throw new IOException("No thread-local org.jruby.Ruby available; can't deserialize Ruby object. Set with Ruby#setThreadLocalRuntime."); } ois.defaultReadObject(); metaClass = (RubyClass)ruby.getClassFromPath(ois.readUTF()); metaClass.getVariableTableManager().deserializeVariables(this, ois); }
/** * Deserialization proceeds as follows: * * <ol> * <li>Deserialize the object instance. It will have null metaClass and * varTable fields.</li> * <li>Deserialize the name of the object's class, and retrieve class from a * thread-local JRuby instance.</li> * <li>Retrieve each variable in turn, re-assigning them by name.</li> * </ol> * * @see RubyBasicObject#writeObject(java.io.ObjectOutputStream) */ private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { Ruby ruby = Ruby.getThreadLocalRuntime(); if (ruby == null) { throw new IOException("No thread-local org.jruby.Ruby available; can't deserialize Ruby object. Set with Ruby#setThreadLocalRuntime."); } ois.defaultReadObject(); metaClass = (RubyClass)ruby.getClassFromPath(ois.readUTF()); metaClass.getVariableTableManager().deserializeVariables(this, ois); }