Top Inners Constructors Methods
org.jruby

public Class RubyObjectSpace

extends Object
Class Inheritance
Annotations
@JRubyModule
name:ObjectSpace
Static Imports
org.jruby.RubyEnumerator.enumeratorize, org.jruby.api.Access.basicObjectClass, .Access.classClass, .Access.moduleClass, .Access.objectClass, org.jruby.api.Convert.*, .Create.newArray, .Create.newArrayNoCopy, .Define.defineModule, org.jruby.api.Error.*, .Warn.warn, org.jruby.runtime.Visibility.*, org.jruby.util.Inspector.inspectPrefix

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
public static class
public static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static boolean
public static RubyModule
createObjectSpaceModule(ThreadContext context, RubyClass Object)

Create the ObjectSpace module and add it to the Ruby runtime.

public static IRubyObject
define_finalizer(IRubyObject recv, IRubyObject[] args, Block block)
Deprecated

public static IRubyObject
public static IRubyObject
each_object(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)

public static IRubyObject
each_objectInternal(final ThreadContext context, IRubyObject recv, IRubyObject[] args, final Block block)

public static IRubyObject
public static IRubyObject
id2ref(IRubyObject recv, IRubyObject id)
Deprecated since 10.0.

public static IRubyObject
private static void
public static IRubyObject
undefine_finalizer(IRubyObject recv, IRubyObject obj, Block block)
Deprecated since 10.0.

public static IRubyObject
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

RubyObjectSpaceback to summary
public RubyObjectSpace()

Method Detail

blockReferencesObjectback to summary
private static boolean blockReferencesObject(IRubyObject object, Block block)
createObjectSpaceModuleback to summary
public static RubyModule createObjectSpaceModule(ThreadContext context, RubyClass Object)

Create the ObjectSpace module and add it to the Ruby runtime.

define_finalizerback to summary
public static IRubyObject define_finalizer(IRubyObject recv, IRubyObject[] args, Block block)

Deprecated

Annotations
@Deprecated
define_finalizerback to summary
public static IRubyObject define_finalizer(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)
Annotations
@JRubyMethod
required:1
optional:1
checkArity:false
module:true
visibility:PRIVATE
each_objectback to summary
public static IRubyObject each_object(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block)
Annotations
@JRubyMethod
name:each_object
optional:1
checkArity:false
module:true
visibility:PRIVATE
each_objectInternalback to summary
public static IRubyObject each_objectInternal(final ThreadContext context, IRubyObject recv, IRubyObject[] args, final Block block)
garbage_collectback to summary
public static IRubyObject garbage_collect(ThreadContext context, IRubyObject recv, IRubyObject[] args)
Annotations
@JRubyMethod
name:garbage_collect
module:true
visibility:PRIVATE
optional:1
checkArity:false
id2refback to summary
public static IRubyObject id2ref(IRubyObject recv, IRubyObject id)

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
id2refback to summary
public static IRubyObject id2ref(ThreadContext context, IRubyObject recv, IRubyObject id)
Annotations
@JRubyMethod
name:_id2ref
module:true
visibility:PRIVATE
referenceWarningback to summary
private static void referenceWarning(ThreadContext context)
undefine_finalizerback to summary
public static IRubyObject undefine_finalizer(IRubyObject recv, IRubyObject obj, Block block)

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
undefine_finalizerback to summary
public static IRubyObject undefine_finalizer(ThreadContext context, IRubyObject recv, IRubyObject obj, Block block)
Annotations
@JRubyMethod
module:true
visibility:PRIVATE
org.jruby back to summary

public abstract Class RubyObjectSpace.AbstractWeakMap

extends RubyObject
Class Inheritance
Known Direct Subclasses
org.jruby.RubyObjectSpace.WeakMap, org.jruby.RubyObjectSpace.WeakKeyMap

Field Summary

Inherited from org.jruby.RubyObject:
IVAR_INSPECTING_OBJECT_ALLOCATOROBJECT_ALLOCATORREIFYING_OBJECT_ALLOCATOR

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract IRubyObject
public IRubyObject
delete(ThreadContext context, IRubyObject key, Block block)

public IRubyObject
each(ThreadContext context, Block block)

public IRubyObject
each_key(ThreadContext context, Block block)

public IRubyObject
each_value(ThreadContext context, Block block)

protected abstract Stream<Map.Entry<IRubyObject, IRubyObject>>
protected abstract Map<IRubyObject, IRubyObject>
public abstract IRubyObject
inspect(ThreadContext context)

Redeclares as abstract: org.jruby.runtime.builtin.IRubyObject.inspect.

Overrides org.jruby.RubyBasicObject.inspect.

Returns a string containing a human-readable representation of obj.

public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public abstract IRubyObject
public IRubyObject
Inherited from org.jruby.RubyObject:
attachToObjectSpacecallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitconvertToTypedigdig1dig2eqlInternalequalInternalequalsfinishObjectClassgetNativeClassIndexhashCodeinspectop_eqqputsspecificEvaltoRubyStringtoString

Constructor Detail

AbstractWeakMapback to summary
public AbstractWeakMap(Ruby runtime, RubyClass cls)

Method Detail

clearback to summary
public abstract IRubyObject clear(ThreadContext context)
Annotations
@JRubyMethod
name:clear
deleteback to summary
public IRubyObject delete(ThreadContext context, IRubyObject key, Block block)
Annotations
@JRubyMethod
name:delete
eachback to summary
public IRubyObject each(ThreadContext context, Block block)
Annotations
@JRubyMethod
name:each, each_pair
each_keyback to summary
public IRubyObject each_key(ThreadContext context, Block block)
Annotations
@JRubyMethod
name:each_key
each_valueback to summary
public IRubyObject each_value(ThreadContext context, Block block)
Annotations
@JRubyMethod
name:each_value
getEntryStreamback to summary
protected abstract Stream<Map.Entry<IRubyObject, IRubyObject>> getEntryStream()
getWeakMapForback to summary
protected abstract Map<IRubyObject, IRubyObject> getWeakMapFor(IRubyObject key)
inspectback to summary
public abstract IRubyObject inspect(ThreadContext context)

Redeclares as abstract: org.jruby.runtime.builtin.IRubyObject.inspect.

Overrides org.jruby.RubyBasicObject.inspect.

Doc from org.jruby.RubyBasicObject.inspect.

Returns a string containing a human-readable representation of obj. If not overridden, uses the to_s method to generate the string. [ 1, 2, 3..4, 'five' ].inspect #=> "[1, 2, 3..4, \"five\"]" Time.new.inspect #=> "Wed Apr 09 08:54:39 CDT 2003"

Annotations
@JRubyMethod
name:inspect
key_pback to summary
public IRubyObject key_p(ThreadContext context, IRubyObject key)
Annotations
@JRubyMethod
name:key?
keysback to summary
public IRubyObject keys(ThreadContext context)
Annotations
@JRubyMethod
name:keys
member_pback to summary
public IRubyObject member_p(ThreadContext context, IRubyObject key)
Annotations
@JRubyMethod
name:include?, member?
op_arefback to summary
public IRubyObject op_aref(ThreadContext context, IRubyObject key)
Annotations
@JRubyMethod
name:[]
op_arefback to summary
public IRubyObject op_aref(ThreadContext context, IRubyObject key, IRubyObject value)
Annotations
@JRubyMethod
name:[]=
sizeback to summary
public abstract IRubyObject size(ThreadContext context)
Annotations
@JRubyMethod
name:length, size
valuesback to summary
public IRubyObject values(ThreadContext context)
Annotations
@JRubyMethod
name:values
org.jruby back to summary

public Class RubyObjectSpace.WeakKeyMap

extends AbstractWeakMap
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final WeakHashMap<IRubyObject, IRubyObject>

Constructor Summary

AccessConstructor and Description
public
WeakKeyMap(Ruby runtime, RubyClass cls)

Method Summary

Modifier and TypeMethod and Description
public IRubyObject
pack-priv static void
createWeakMap(ThreadContext context, RubyClass Object, RubyModule ObjectSpace)

protected Stream<Map.Entry<IRubyObject, IRubyObject>>
public IRubyObject
protected Map<IRubyObject, IRubyObject>
public IRubyObject
inspect(ThreadContext context)

Overrides default org.jruby.runtime.builtin.IRubyObject.inspect.

Implements abstract org.jruby.RubyObjectSpace.AbstractWeakMap.inspect.

Returns a string containing a human-readable representation of obj.

public IRubyObject
public IRubyObject
Inherited from org.jruby.RubyObjectSpace.AbstractWeakMap:
deleteeacheach_keyeach_valuekey_pkeysmember_pop_arefvalues

Field Detail

weakMapback to summary
private final WeakHashMap<IRubyObject, IRubyObject> weakMap

Constructor Detail

WeakKeyMapback to summary
public WeakKeyMap(Ruby runtime, RubyClass cls)

Method Detail

clearback to summary
public IRubyObject clear(ThreadContext context)

Implements abstract org.jruby.RubyObjectSpace.AbstractWeakMap.clear.

Annotations
@Override
createWeakMapback to summary
pack-priv static void createWeakMap(ThreadContext context, RubyClass Object, RubyModule ObjectSpace)
getEntryStreamback to summary
protected Stream<Map.Entry<IRubyObject, IRubyObject>> getEntryStream()

Implements abstract org.jruby.RubyObjectSpace.AbstractWeakMap.getEntryStream.

getkeyback to summary
public IRubyObject getkey(ThreadContext context, IRubyObject key)
Annotations
@JRubyMethod
name:getkey
getWeakMapForback to summary
protected Map<IRubyObject, IRubyObject> getWeakMapFor(IRubyObject key)

Implements abstract org.jruby.RubyObjectSpace.AbstractWeakMap.getWeakMapFor.

inspectback to summary
public IRubyObject inspect(ThreadContext context)

Overrides default org.jruby.runtime.builtin.IRubyObject.inspect.

Implements abstract org.jruby.RubyObjectSpace.AbstractWeakMap.inspect.

Doc from org.jruby.RubyBasicObject.inspect.

Returns a string containing a human-readable representation of obj. If not overridden, uses the to_s method to generate the string. [ 1, 2, 3..4, 'five' ].inspect #=> "[1, 2, 3..4, \"five\"]" Time.new.inspect #=> "Wed Apr 09 08:54:39 CDT 2003"

op_arefback to summary
public IRubyObject op_aref(ThreadContext context, IRubyObject key, IRubyObject value)

Overrides org.jruby.RubyObjectSpace.AbstractWeakMap.op_aref.

sizeback to summary
public IRubyObject size(ThreadContext context)

Implements abstract org.jruby.RubyObjectSpace.AbstractWeakMap.size.

org.jruby back to summary

public Class RubyObjectSpace.WeakMap

extends AbstractWeakMap
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final WeakValuedIdentityMap<IRubyObject, IRubyObject>
private final WeakValuedMap<IRubyObject, IRubyObject>

Constructor Summary

AccessConstructor and Description
public
WeakMap(Ruby runtime, RubyClass cls)

Method Summary

Modifier and TypeMethod and Description
public IRubyObject
pack-priv static void
createWeakMap(ThreadContext context, RubyClass Object, RubyModule ObjectSpace)

protected Stream<Map.Entry<IRubyObject, IRubyObject>>
protected Map<IRubyObject, IRubyObject>
public IRubyObject
inspect(ThreadContext context)

Overrides default org.jruby.runtime.builtin.IRubyObject.inspect.

Implements abstract org.jruby.RubyObjectSpace.AbstractWeakMap.inspect.

Returns a string containing a human-readable representation of obj.

public IRubyObject
Inherited from org.jruby.RubyObjectSpace.AbstractWeakMap:
deleteeacheach_keyeach_valuekey_pkeysmember_pop_arefop_arefvalues

Field Detail

identityMapback to summary
private final WeakValuedIdentityMap<IRubyObject, IRubyObject> identityMap
valueMapback to summary
private final WeakValuedMap<IRubyObject, IRubyObject> valueMap

Constructor Detail

WeakMapback to summary
public WeakMap(Ruby runtime, RubyClass cls)

Method Detail

clearback to summary
public IRubyObject clear(ThreadContext context)

Implements abstract org.jruby.RubyObjectSpace.AbstractWeakMap.clear.

Annotations
@Override
createWeakMapback to summary
pack-priv static void createWeakMap(ThreadContext context, RubyClass Object, RubyModule ObjectSpace)
getEntryStreamback to summary
protected Stream<Map.Entry<IRubyObject, IRubyObject>> getEntryStream()

Implements abstract org.jruby.RubyObjectSpace.AbstractWeakMap.getEntryStream.

getWeakMapForback to summary
protected Map<IRubyObject, IRubyObject> getWeakMapFor(IRubyObject key)

Implements abstract org.jruby.RubyObjectSpace.AbstractWeakMap.getWeakMapFor.

inspectback to summary
public IRubyObject inspect(ThreadContext context)

Overrides default org.jruby.runtime.builtin.IRubyObject.inspect.

Implements abstract org.jruby.RubyObjectSpace.AbstractWeakMap.inspect.

Doc from org.jruby.RubyBasicObject.inspect.

Returns a string containing a human-readable representation of obj. If not overridden, uses the to_s method to generate the string. [ 1, 2, 3..4, 'five' ].inspect #=> "[1, 2, 3..4, \"five\"]" Time.new.inspect #=> "Wed Apr 09 08:54:39 CDT 2003"

sizeback to summary
public IRubyObject size(ThreadContext context)

Implements abstract org.jruby.RubyObjectSpace.AbstractWeakMap.size.