|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRubyObject
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 |
---|
static final IRubyObject[] NULL_ARRAY
Method Detail |
---|
int getNativeTypeIndex()
java.util.Map safeGetInstanceVariables()
boolean safeHasInstanceVariables()
IRubyObject getInstanceVariable(java.lang.String string)
string
-
IRubyObject setInstanceVariable(java.lang.String string, IRubyObject rubyObject)
string
- rubyObject
-
java.util.Map getInstanceVariables()
void setInstanceVariables(java.util.Map instanceVariables)
instanceVariables
- java.util.Map getInstanceVariablesSnapshot()
IRubyObject callMethod(ThreadContext context, RubyModule rubyclass, java.lang.String name, IRubyObject[] args, CallType callType, Block block)
context
- rubyclass
- name
- args
- callType
- block
-
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
-
IRubyObject callMethod(ThreadContext context, int methodIndex, java.lang.String name, IRubyObject arg)
context
- methodIndex
- name
- arg
-
IRubyObject callMethod(ThreadContext context, int methodIndex, java.lang.String name, IRubyObject[] args)
context
- methodIndex
- name
- args
-
IRubyObject callMethod(ThreadContext context, int methodIndex, java.lang.String name, IRubyObject[] args, CallType callType)
context
- methodIndex
- name
- args
- callType
-
IRubyObject callMethod(ThreadContext context, java.lang.String name, IRubyObject[] args, CallType callType)
context
- name
- args
- callType
-
IRubyObject callMethod(ThreadContext context, java.lang.String name, IRubyObject[] args, CallType callType, Block block)
context
- name
- args
- callType
- block
-
IRubyObject compilerCallMethod(ThreadContext context, java.lang.String name, IRubyObject[] args, IRubyObject caller, CallType callType, Block block)
context
- name
- args
- caller
- callType
- block
-
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
-
IRubyObject callSuper(ThreadContext context, IRubyObject[] args, Block block)
context
- args
- block
-
IRubyObject callMethod(ThreadContext context, java.lang.String string)
context
- string
-
IRubyObject callMethod(ThreadContext context, int methodIndex, java.lang.String string)
context
- string
-
IRubyObject callMethod(ThreadContext context, java.lang.String string, Block aBlock)
context
- string
- aBlock
-
IRubyObject callMethod(ThreadContext context, java.lang.String string, IRubyObject arg)
context
- string
- arg
-
IRubyObject callMethod(ThreadContext context, java.lang.String method, IRubyObject[] rubyArgs)
context
- method
- rubyArgs
-
IRubyObject callMethod(ThreadContext context, java.lang.String method, IRubyObject[] rubyArgs, Block block)
context
- method
- rubyArgs
- block
-
boolean isNil()
boolean isTrue()
boolean isTaint()
void setTaint(boolean b)
b
- boolean isFrozen()
void setFrozen(boolean b)
b
- boolean isImmediate()
boolean isKindOf(RubyModule rubyClass)
rubyClass
-
IRubyObject infectBy(IRubyObject obj)
obj
-
RubyClass getMetaClass()
void setMetaClass(RubyClass metaClass)
metaClass
- RubyClass getSingletonClass()
RubyClass getType()
boolean respondsTo(java.lang.String string)
string
-
Ruby getRuntime()
java.lang.Class getJavaClass()
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
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
java.lang.String asSymbol()
RubyString asString()
RubyArray convertToArray()
RubyHash convertToHash()
RubyFloat convertToFloat()
RubyInteger convertToInteger()
RubyString convertToString()
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
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
IRubyObject convertToType(RubyClass targetType, int convertMethodIndex, java.lang.String convertMethod, boolean raiseOnMissingMethod, boolean raiseOnWrongTypeResult, boolean allowNilThrough)
targetType
- convertMethod
- raiseOnMissingMethod
- raiseOnWrongTypeResult
- allowNilThrough
-
IRubyObject anyToString()
IRubyObject checkStringType()
IRubyObject checkArrayType()
IRubyObject dup()
IRubyObject inspect()
IRubyObject rbClone(Block unusedBlock)
boolean isSingleton()
java.util.Iterator instanceVariableNames()
void dataWrapStruct(java.lang.Object obj)
obj
- the object to wrapjava.lang.Object dataGetStruct()
RubyFixnum id()
IRubyObject equal(IRubyObject other)
IRubyObject equalInternal(ThreadContext context, IRubyObject other)
boolean eql(IRubyObject other)
boolean eqlInternal(ThreadContext context, IRubyObject other)
void addFinalizer(RubyProc finalizer)
void removeFinalizers()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |