public class RubyObject extends RubyBasicObject
Modifier and Type | Class and Description |
---|---|
static class |
RubyObject.Data |
RubyBasicObject.Finalizer
Modifier and Type | Field and Description |
---|---|
static Class[] |
FIELD_ALLOCATED_CLASSES |
static Set<ObjectAllocator> |
FIELD_ALLOCATOR_SET |
static ObjectAllocator[] |
FIELD_ALLOCATORS |
static ObjectAllocator |
IVAR_INSPECTING_OBJECT_ALLOCATOR
Allocator that inspects all methods for instance variables and chooses
a concrete class to construct based on that.
|
static ObjectAllocator |
OBJECT_ALLOCATOR
Default allocator instance for all Ruby objects.
|
static ObjectAllocator |
OBJECT_VAR0_ALLOCATOR |
static ObjectAllocator |
OBJECT_VAR1_ALLOCATOR |
static ObjectAllocator |
OBJECT_VAR2_ALLOCATOR |
static ObjectAllocator |
OBJECT_VAR3_ALLOCATOR |
static ObjectAllocator |
OBJECT_VAR4_ALLOCATOR |
static ObjectAllocator |
OBJECT_VAR5_ALLOCATOR |
static ObjectAllocator |
OBJECT_VAR6_ALLOCATOR |
static ObjectAllocator |
OBJECT_VAR7_ALLOCATOR |
static ObjectAllocator |
OBJECT_VAR8_ALLOCATOR |
static ObjectAllocator |
OBJECT_VAR9_ALLOCATOR |
static ObjectAllocator |
REIFYING_OBJECT_ALLOCATOR |
ALL_F, BASICOBJECT_ALLOCATOR, COMPARE_BY_IDENTITY_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, IS_OVERLAID_F, metaClass, NEVER, NIL_F, REFINED_MODULE_F, STAMP_OFFSET, TAINTED_F, UNDEF, UNTRUST_F, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, USER8_F, USER9_F, USERA_F, VAR_TABLE_OFFSET, varTable, varTableStamp
NULL_ARRAY
Modifier | Constructor and Description |
---|---|
|
RubyObject(RubyClass metaClass)
Path for objects that don't taint and don't enter objectspace.
|
|
RubyObject(Ruby runtime,
RubyClass metaClass)
Standard path for object creation.
|
protected |
RubyObject(Ruby runtime,
RubyClass metaClass,
boolean useObjectSpace)
Path for objects who want to decide whether they don't want to be in
ObjectSpace even when it is on.
|
protected |
RubyObject(Ruby runtime,
RubyClass metaClass,
boolean useObjectSpace,
boolean canBeTainted)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
attachToObjectSpace()
Will make sure that this object is added to the current object
space.
|
void |
callInit(Block block)
Call the Ruby initialize method with the supplied arguments and block.
|
void |
callInit(IRubyObject[] args,
Block block)
Call the Ruby initialize method with the supplied arguments and block.
|
void |
callInit(IRubyObject arg0,
Block block)
Call the Ruby initialize method with the supplied arguments and block.
|
void |
callInit(IRubyObject arg0,
IRubyObject arg1,
Block block)
Call the Ruby initialize method with the supplied arguments and block.
|
void |
callInit(IRubyObject arg0,
IRubyObject arg1,
IRubyObject arg2,
Block block)
Call the Ruby initialize method with the supplied arguments and block.
|
void |
callInit(ThreadContext context,
Block block) |
void |
callInit(ThreadContext context,
IRubyObject[] args,
Block block) |
void |
callInit(ThreadContext context,
IRubyObject arg0,
Block block) |
void |
callInit(ThreadContext context,
IRubyObject arg0,
IRubyObject arg1,
Block block) |
void |
callInit(ThreadContext context,
IRubyObject arg0,
IRubyObject arg1,
IRubyObject arg2,
Block block) |
IRubyObject |
convertToType(RubyClass target,
int convertMethodIndex)
Deprecated.
|
static RubyClass |
createObjectClass(Ruby runtime,
RubyClass objectClass)
Will create the Ruby class Object in the runtime
specified.
|
static IRubyObject |
dig(ThreadContext context,
IRubyObject obj,
IRubyObject[] args,
int idx) |
protected static boolean |
eqlInternal(ThreadContext context,
IRubyObject a,
IRubyObject b)
Helper method for checking equality, first using Java identity
equality, and then calling the "eql?" method.
|
static boolean |
equalInternal(ThreadContext context,
IRubyObject a,
IRubyObject b)
Helper method for checking equality, first using Java identity
equality, and then calling the "==" method.
|
boolean |
equals(Object other)
This override does not do a "checked" dispatch.
|
ClassIndex |
getNativeClassIndex()
This is overridden in the other concrete Java builtins to provide a fast way
to determine what type they are.
|
int |
hashCode()
This override does not do "checked" dispatch since Object usually has #hash defined.
|
static RubyString |
inspect(ThreadContext context,
IRubyObject object)
rb_inspect
The internal helper that ensures a RubyString instance is returned
so dangerous casting can be omitted
Prefered over callMethod(context, "inspect")
|
IRubyObject |
op_eqq(ThreadContext context,
IRubyObject other)
rb_equal
The Ruby "===" method is used by default in case/when
statements.
|
static void |
puts(Object obj)
Simple helper to print any objects.
|
IRubyObject |
specificEval(ThreadContext context,
RubyModule mod,
IRubyObject[] args,
Block block,
EvalType evalType)
Deprecated.
|
String |
toString()
The default toString method is just a wrapper that calls the
Ruby "to_s" method.
|
addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkCallMethod, checkFrozen, checkStringType, checkStringType19, compareTo, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, createBasicObjectClass, dataGetStruct, dataGetStructChecked, dataWrapStruct, display, dup, ensureInstanceVariablesSettable, eql_p, eql, equal_p, equal_p19, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, freeze, frozen_p, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getJavaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hash, hashyInspect, hasInstanceVariable, hasInternalVariable, hasVariables, id, infectBy, initialize_copy, initialize, initialize, initialize19, inspect, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval19, instance_eval19, instance_eval19, instance_eval19, instance_exec, instance_exec19, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, instance_variables19, isBuiltin, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isSpecialConst, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, method_missing19, method, method19, methods, methods, methods19, nil_p, nonFixnumHashCode, OBJ_INIT_COPY, objInitCopy, op_cmp, op_equal_19, op_equal, op_match, op_match19, op_not_equal, op_not_match, op_not, private_methods, private_methods19, protected_methods, protected_methods19, public_methods, public_methods19, rbClone, rbInspect, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respond_to_p, respond_to_p19, respond_to_p19, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, send19, send19, send19, send19, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, setVariable, singleton_method_added19, singleton_method_removed19, singleton_method_undefined19, singleton_methods, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_a, to_s, toJava, trust, type_deprecated, type, untaint, untrust, untrusted_p, validateInstanceVariable, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnder
public static final ObjectAllocator OBJECT_ALLOCATOR
ObjectAllocator
public static final ObjectAllocator OBJECT_VAR0_ALLOCATOR
public static final ObjectAllocator OBJECT_VAR1_ALLOCATOR
public static final ObjectAllocator OBJECT_VAR2_ALLOCATOR
public static final ObjectAllocator OBJECT_VAR3_ALLOCATOR
public static final ObjectAllocator OBJECT_VAR4_ALLOCATOR
public static final ObjectAllocator OBJECT_VAR5_ALLOCATOR
public static final ObjectAllocator OBJECT_VAR6_ALLOCATOR
public static final ObjectAllocator OBJECT_VAR7_ALLOCATOR
public static final ObjectAllocator OBJECT_VAR8_ALLOCATOR
public static final ObjectAllocator OBJECT_VAR9_ALLOCATOR
public static final ObjectAllocator[] FIELD_ALLOCATORS
public static final Set<ObjectAllocator> FIELD_ALLOCATOR_SET
public static final Class[] FIELD_ALLOCATED_CLASSES
public static final ObjectAllocator IVAR_INSPECTING_OBJECT_ALLOCATOR
public static final ObjectAllocator REIFYING_OBJECT_ALLOCATOR
public RubyObject(Ruby runtime, RubyClass metaClass)
public RubyObject(RubyClass metaClass)
@Deprecated protected RubyObject(Ruby runtime, RubyClass metaClass, boolean useObjectSpace, boolean canBeTainted)
public static RubyClass createObjectClass(Ruby runtime, RubyClass objectClass)
public void attachToObjectSpace()
ObjectSpace
public ClassIndex getNativeClassIndex()
getNativeClassIndex
in interface CoreObjectType
getNativeClassIndex
in class RubyBasicObject
ClassIndex
public static void puts(Object obj)
public boolean equals(Object other)
equals
in class RubyBasicObject
RubyBasicObject.equals(Object)
public String toString()
public final void callInit(IRubyObject[] args, Block block)
public final void callInit(Block block)
public final void callInit(IRubyObject arg0, Block block)
public final void callInit(IRubyObject arg0, IRubyObject arg1, Block block)
public final void callInit(IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
public final void callInit(ThreadContext context, IRubyObject[] args, Block block)
public final void callInit(ThreadContext context, Block block)
public final void callInit(ThreadContext context, IRubyObject arg0, Block block)
public final void callInit(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block)
public final void callInit(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
@Deprecated public final IRubyObject convertToType(RubyClass target, int convertMethodIndex)
@Deprecated public IRubyObject specificEval(ThreadContext context, RubyModule mod, IRubyObject[] args, Block block, EvalType evalType)
public IRubyObject op_eqq(ThreadContext context, IRubyObject other)
op_eqq
in interface IRubyObject
op_eqq
in class RubyBasicObject
public static boolean equalInternal(ThreadContext context, IRubyObject a, IRubyObject b)
protected static boolean eqlInternal(ThreadContext context, IRubyObject a, IRubyObject b)
public int hashCode()
hashCode
in class RubyBasicObject
RubyBasicObject.hashCode()
public static RubyString inspect(ThreadContext context, IRubyObject object)
public static IRubyObject dig(ThreadContext context, IRubyObject obj, IRubyObject[] args, int idx)
Copyright © 2001-2016 JRuby. All Rights Reserved.