|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object is the parent class of all classes in Ruby. Its methods are therefore available to all objects unless explicitly overridden.
Field Summary | |
static IRubyObject[] |
NULL_ARRAY
|
Method Summary | |
void |
addFinalizer(RubyProc finalizer)
|
IRubyObject |
anyToString()
|
RubyString |
asString()
rb_obj_as_string |
java.lang.String |
asSymbol()
Convert the object into a symbol name if possible. |
IRubyObject |
callMethod(ThreadContext context,
int methodIndex,
java.lang.String string)
|
IRubyObject |
callMethod(ThreadContext context,
int methodIndex,
java.lang.String name,
IRubyObject arg)
|
IRubyObject |
callMethod(ThreadContext context,
int methodIndex,
java.lang.String name,
IRubyObject[] args)
|
IRubyObject |
callMethod(ThreadContext context,
int methodIndex,
java.lang.String name,
IRubyObject[] args,
CallType callType)
|
IRubyObject |
callMethod(ThreadContext context,
RubyModule rubyclass,
int methodIndex,
java.lang.String name,
IRubyObject[] args,
CallType callType,
Block block)
|
IRubyObject |
callMethod(ThreadContext context,
RubyModule rubyclass,
java.lang.String name,
IRubyObject[] args,
CallType callType,
Block block)
|
IRubyObject |
callMethod(ThreadContext context,
java.lang.String string)
|
IRubyObject |
callMethod(ThreadContext context,
java.lang.String string,
Block aBlock)
|
IRubyObject |
callMethod(ThreadContext context,
java.lang.String string,
IRubyObject arg)
|
IRubyObject |
callMethod(ThreadContext context,
java.lang.String method,
IRubyObject[] rubyArgs)
|
IRubyObject |
callMethod(ThreadContext context,
java.lang.String method,
IRubyObject[] rubyArgs,
Block block)
|
IRubyObject |
callMethod(ThreadContext context,
java.lang.String name,
IRubyObject[] args,
CallType callType)
|
IRubyObject |
callMethod(ThreadContext context,
java.lang.String name,
IRubyObject[] args,
CallType callType,
Block block)
|
IRubyObject |
callSuper(ThreadContext context,
IRubyObject[] args,
Block block)
|
IRubyObject |
checkArrayType()
|
IRubyObject |
checkStringType()
|
IRubyObject |
compilerCallMethod(ThreadContext context,
java.lang.String name,
IRubyObject[] args,
IRubyObject caller,
CallType callType,
Block block)
|
IRubyObject |
compilerCallMethodWithIndex(ThreadContext context,
int methodIndex,
java.lang.String name,
IRubyObject[] args,
IRubyObject caller,
CallType callType,
Block block)
|
RubyArray |
convertToArray()
Methods which perform to_xxx if the object has such a method |
RubyFloat |
convertToFloat()
|
RubyHash |
convertToHash()
|
RubyInteger |
convertToInteger()
|
RubyString |
convertToString()
|
IRubyObject |
convertToType(RubyClass targetType,
int convertMethodIndex,
java.lang.String convertMethod,
boolean raiseOnError)
Converts this object to type 'targetType' using 'convertMethod' method (MRI: convert_type). |
IRubyObject |
convertToType(RubyClass targetType,
int convertMethodIndex,
java.lang.String convertMethod,
boolean raiseOnMissingMethod,
boolean raiseOnWrongTypeResult,
boolean allowNilThrough)
|
IRubyObject |
convertToTypeWithCheck(RubyClass targetType,
int convertMethodIndex,
java.lang.String convertMethod)
Higher level conversion utility similiar to convertToType but it can throw an additional TypeError during conversion (MRI: rb_check_convert_type). |
java.lang.Object |
dataGetStruct()
Our version of Data_Get_Struct. |
void |
dataWrapStruct(java.lang.Object obj)
Our version of Data_Wrap_Struct. |
IRubyObject |
dup()
RubyMethod dup. |
boolean |
eql(IRubyObject other)
|
boolean |
eqlInternal(ThreadContext context,
IRubyObject other)
|
IRubyObject |
equal(IRubyObject other)
|
IRubyObject |
equalInternal(ThreadContext context,
IRubyObject other)
|
IRubyObject |
evalSimple(ThreadContext context,
IRubyObject evalString,
java.lang.String file)
Evaluate the given string. |
IRubyObject |
evalWithBinding(ThreadContext context,
IRubyObject evalString,
IRubyObject binding,
java.lang.String file,
int lineNumber)
Evaluate the given string under the specified binding object. |
IRubyObject |
getInstanceVariable(java.lang.String string)
RubyMethod getInstanceVar. |
java.util.Map |
getInstanceVariables()
|
java.util.Map |
getInstanceVariablesSnapshot()
|
java.lang.Class |
getJavaClass()
RubyMethod getJavaClass. |
RubyClass |
getMetaClass()
RubyMethod getRubyClass. |
int |
getNativeTypeIndex()
Return the ClassIndex value for the native type this object was constructed from. |
Ruby |
getRuntime()
RubyMethod getRuntime. |
RubyClass |
getSingletonClass()
RubyMethod getSingletonClass. |
RubyClass |
getType()
RubyMethod getType. |
RubyFixnum |
id()
|
IRubyObject |
infectBy(IRubyObject obj)
Infect this object using the taint of another object |
IRubyObject |
inspect()
RubyMethod inspect. |
java.util.Iterator |
instanceVariableNames()
|
boolean |
isFrozen()
RubyMethod isFrozen. |
boolean |
isImmediate()
|
boolean |
isKindOf(RubyModule rubyClass)
RubyMethod isKindOf. |
boolean |
isNil()
RubyMethod isNil. |
boolean |
isSingleton()
|
boolean |
isTaint()
RubyMethod isTaint. |
boolean |
isTrue()
|
IRubyObject |
rbClone(Block unusedBlock)
RubyMethod rbClone. |
void |
removeFinalizers()
|
boolean |
respondsTo(java.lang.String string)
RubyMethod respondsTo. |
java.util.Map |
safeGetInstanceVariables()
Gets a copy of the instance variables for this object, if any exist. |
boolean |
safeHasInstanceVariables()
Returns true if the object has any instance variables, false otherwise. |
void |
setFrozen(boolean b)
RubyMethod setFrozen. |
IRubyObject |
setInstanceVariable(java.lang.String string,
IRubyObject rubyObject)
RubyMethod setInstanceVar. |
void |
setInstanceVariables(java.util.Map instanceVariables)
|
void |
setMetaClass(RubyClass metaClass)
|
void |
setTaint(boolean b)
RubyMethod setTaint. |
Field Detail |
public static final IRubyObject[] NULL_ARRAY
Method Detail |
public int getNativeTypeIndex()
public java.util.Map safeGetInstanceVariables()
public boolean safeHasInstanceVariables()
public IRubyObject getInstanceVariable(java.lang.String string)
string
-
public IRubyObject setInstanceVariable(java.lang.String string, IRubyObject rubyObject)
string
- rubyObject
-
public java.util.Map getInstanceVariables()
public void setInstanceVariables(java.util.Map instanceVariables)
instanceVariables
- public java.util.Map getInstanceVariablesSnapshot()
public IRubyObject callMethod(ThreadContext context, RubyModule rubyclass, java.lang.String name, IRubyObject[] args, CallType callType, Block block)
context
- rubyclass
- name
- args
- callType
- block
-
public IRubyObject callMethod(ThreadContext context, RubyModule rubyclass, int methodIndex, java.lang.String name, IRubyObject[] args, CallType callType, Block block)
context
- rubyclass
- methodIndex
- name
- args
- callType
- block
-
public IRubyObject callMethod(ThreadContext context, int methodIndex, java.lang.String name, IRubyObject arg)
context
- methodIndex
- name
- arg
-
public IRubyObject callMethod(ThreadContext context, int methodIndex, java.lang.String name, IRubyObject[] args)
context
- methodIndex
- name
- args
-
public IRubyObject callMethod(ThreadContext context, int methodIndex, java.lang.String name, IRubyObject[] args, CallType callType)
context
- methodIndex
- name
- args
- callType
-
public IRubyObject callMethod(ThreadContext context, java.lang.String name, IRubyObject[] args, CallType callType)
context
- name
- args
- callType
-
public IRubyObject callMethod(ThreadContext context, java.lang.String name, IRubyObject[] args, CallType callType, Block block)
context
- name
- args
- callType
- block
-
public IRubyObject compilerCallMethod(ThreadContext context, java.lang.String name, IRubyObject[] args, IRubyObject caller, CallType callType, Block block)
context
- name
- args
- caller
- callType
- block
-
public IRubyObject compilerCallMethodWithIndex(ThreadContext context, int methodIndex, java.lang.String name, IRubyObject[] args, IRubyObject caller, CallType callType, Block block)
context
- methodIndex
- name
- args
- caller
- callType
- block
-
public IRubyObject callSuper(ThreadContext context, IRubyObject[] args, Block block)
context
- args
- block
-
public IRubyObject callMethod(ThreadContext context, java.lang.String string)
context
- string
-
public IRubyObject callMethod(ThreadContext context, int methodIndex, java.lang.String string)
context
- string
-
public IRubyObject callMethod(ThreadContext context, java.lang.String string, Block aBlock)
context
- string
- aBlock
-
public IRubyObject callMethod(ThreadContext context, java.lang.String string, IRubyObject arg)
context
- string
- arg
-
public IRubyObject callMethod(ThreadContext context, java.lang.String method, IRubyObject[] rubyArgs)
context
- method
- rubyArgs
-
public IRubyObject callMethod(ThreadContext context, java.lang.String method, IRubyObject[] rubyArgs, Block block)
context
- method
- rubyArgs
- block
-
public boolean isNil()
public boolean isTrue()
public boolean isTaint()
public void setTaint(boolean b)
b
- public boolean isFrozen()
public void setFrozen(boolean b)
b
- public boolean isImmediate()
public boolean isKindOf(RubyModule rubyClass)
rubyClass
-
public IRubyObject infectBy(IRubyObject obj)
obj
-
public RubyClass getMetaClass()
public void setMetaClass(RubyClass metaClass)
metaClass
- public RubyClass getSingletonClass()
public RubyClass getType()
public boolean respondsTo(java.lang.String string)
string
-
public Ruby getRuntime()
public java.lang.Class getJavaClass()
public IRubyObject evalWithBinding(ThreadContext context, IRubyObject evalString, IRubyObject binding, java.lang.String file, int lineNumber)
context
- TODOevalString
- The string containing the text to be evaluatedbinding
- The binding object under which to perform the evaluationfile
- The filename to use when reporting errors during the evaluationlineNumber
- is the line number to pretend we are starting from
public IRubyObject evalSimple(ThreadContext context, IRubyObject evalString, java.lang.String file)
context
- TODOevalString
- The string containing the text to be evaluatedfile
- The filename to use when reporting errors during the evaluation
public java.lang.String asSymbol()
public RubyString asString()
public RubyArray convertToArray()
public RubyHash convertToHash()
public RubyFloat convertToFloat()
public RubyInteger convertToInteger()
public RubyString convertToString()
public IRubyObject convertToType(RubyClass targetType, int convertMethodIndex, java.lang.String convertMethod, boolean raiseOnError)
targetType
- is the type we are trying to convert toconvertMethod
- is the method to be called to try and convert to targeTyperaiseOnError
- will throw an Error if conversion does not work
public IRubyObject convertToTypeWithCheck(RubyClass targetType, int convertMethodIndex, java.lang.String convertMethod)
targetType
- is the type we are trying to convert toconvertMethod
- is the method to be called to try and convert to targeType
public IRubyObject convertToType(RubyClass targetType, int convertMethodIndex, java.lang.String convertMethod, boolean raiseOnMissingMethod, boolean raiseOnWrongTypeResult, boolean allowNilThrough)
targetType
- convertMethod
- raiseOnMissingMethod
- raiseOnWrongTypeResult
- allowNilThrough
-
public IRubyObject anyToString()
public IRubyObject checkStringType()
public IRubyObject checkArrayType()
public IRubyObject dup()
public IRubyObject inspect()
public IRubyObject rbClone(Block unusedBlock)
public boolean isSingleton()
public java.util.Iterator instanceVariableNames()
public void dataWrapStruct(java.lang.Object obj)
obj
- the object to wrappublic java.lang.Object dataGetStruct()
public RubyFixnum id()
public IRubyObject equal(IRubyObject other)
public IRubyObject equalInternal(ThreadContext context, IRubyObject other)
public boolean eql(IRubyObject other)
public boolean eqlInternal(ThreadContext context, IRubyObject other)
public void addFinalizer(RubyProc finalizer)
public void removeFinalizers()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |