org.jruby.runtime
Class ObjectSpace

java.lang.Object
  extended by org.jruby.runtime.ObjectSpace

public class ObjectSpace
extends java.lang.Object

FIXME: This version is faster than the previous, but both suffer from a crucial flaw: It is impossible to create an ObjectSpace with an iterator that doesn't either: a. hold on to objects that might otherwise be collected or b. have no way to guarantee that a call to hasNext() will be correct or that a subsequent call to next() will produce an object. For our purposes, for now, this may be acceptable.


Constructor Summary
ObjectSpace()
           
 
Method Summary
 void add(IRubyObject object)
           
 void addFinalizer(IRubyObject object, IRubyObject proc)
           
static long calculateObjectId(java.lang.Object object)
           
 long createAndRegisterObjectId(IRubyObject rubyObject)
           
 IRubyObject id2ref(long id)
           
 long idOf(IRubyObject rubyObject)
          Deprecated. 
 java.util.Iterator iterator(RubyModule rubyClass)
           
 void registerObjectId(long id, IRubyObject object)
           
 void removeFinalizers(long id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectSpace

public ObjectSpace()
Method Detail

registerObjectId

public void registerObjectId(long id,
                             IRubyObject object)

calculateObjectId

public static long calculateObjectId(java.lang.Object object)

createAndRegisterObjectId

public long createAndRegisterObjectId(IRubyObject rubyObject)

id2ref

public IRubyObject id2ref(long id)

idOf

@Deprecated
public long idOf(IRubyObject rubyObject)
Deprecated. 


addFinalizer

public void addFinalizer(IRubyObject object,
                         IRubyObject proc)

removeFinalizers

public void removeFinalizers(long id)

add

public void add(IRubyObject object)

iterator

public java.util.Iterator iterator(RubyModule rubyClass)


Copyright © 2002-2009 JRuby Team. All Rights Reserved.