|
||||||||||
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(IRubyObject finalizer)
|
IRubyObject |
anyToString()
|
java.lang.String |
asJavaString()
Convert the object into a symbol name if possible. |
RubyString |
asString()
rb_obj_as_string |
IRubyObject |
callMethod(ThreadContext context,
int methodIndex,
java.lang.String name)
Deprecated. |
IRubyObject |
callMethod(ThreadContext context,
int methodIndex,
java.lang.String name,
IRubyObject arg)
Deprecated. |
IRubyObject |
callMethod(ThreadContext context,
java.lang.String name)
|
IRubyObject |
callMethod(ThreadContext context,
java.lang.String name,
IRubyObject arg)
|
IRubyObject |
callMethod(ThreadContext context,
java.lang.String name,
IRubyObject[] args)
|
IRubyObject |
callMethod(ThreadContext context,
java.lang.String name,
IRubyObject[] args,
Block block)
|
IRubyObject |
callSuper(ThreadContext context,
IRubyObject[] args,
Block block)
Deprecated. |
IRubyObject |
checkArrayType()
|
IRubyObject |
checkCallMethod(ThreadContext context,
java.lang.String name)
|
IRubyObject |
checkStringType()
|
IRubyObject |
checkStringType19()
|
RubyArray |
convertToArray()
Methods which perform to_xxx if the object has such a method |
RubyFloat |
convertToFloat()
|
RubyHash |
convertToHash()
|
RubyInteger |
convertToInteger()
|
RubyInteger |
convertToInteger(int convertMethodIndex,
java.lang.String convertMethod)
Deprecated. |
RubyInteger |
convertToInteger(java.lang.String convertMethod)
|
RubyString |
convertToString()
|
void |
copySpecialInstanceVariables(IRubyObject clone)
|
java.lang.Object |
dataGetStruct()
Our version of Data_Get_Struct. |
java.lang.Object |
dataGetStructChecked()
|
void |
dataWrapStruct(java.lang.Object obj)
Our version of Data_Wrap_Struct. |
IRubyObject |
dup()
RubyMethod dup. |
boolean |
eql(IRubyObject other)
|
InstanceVariables |
getInstanceVariables()
|
InternalVariables |
getInternalVariables()
|
java.lang.Class |
getJavaClass()
RubyMethod getJavaClass. |
RubyClass |
getMetaClass()
RubyMethod getRubyClass. |
Ruby |
getRuntime()
RubyMethod getRuntime. |
RubyClass |
getSingletonClass()
RubyMethod getSingletonClass. |
RubyClass |
getType()
RubyMethod getType. |
java.lang.Object |
getVariable(int index)
|
int |
getVariableCount()
|
java.util.List<Variable<java.lang.Object>> |
getVariableList()
|
java.util.List<java.lang.String> |
getVariableNameList()
|
boolean |
hasVariables()
Returns true if object has any variables, defined as: instance variables class variables constants internal variables, such as those used when marshalling Ranges and Exceptions |
IRubyObject |
id()
|
IRubyObject |
infectBy(IRubyObject obj)
Infect this object using the taint of another object |
IRubyObject |
inspect()
RubyMethod inspect. |
boolean |
isClass()
|
boolean |
isFrozen()
RubyMethod isFrozen. |
boolean |
isImmediate()
|
boolean |
isModule()
|
boolean |
isNil()
RubyMethod isNil. |
boolean |
isTaint()
RubyMethod isTaint. |
boolean |
isTrue()
|
boolean |
isUntrusted()
RubyMethod isUntrusted. |
IRubyObject |
op_eqq(ThreadContext context,
IRubyObject other)
|
IRubyObject |
op_equal(ThreadContext context,
IRubyObject other)
|
IRubyObject |
rbClone()
RubyMethod rbClone. |
void |
removeFinalizers()
|
boolean |
respondsTo(java.lang.String string)
RubyMethod respondsTo. |
boolean |
respondsToMissing(java.lang.String string)
RubyMethod respondsTo. |
boolean |
respondsToMissing(java.lang.String string,
boolean priv)
RubyMethod respondsTo. |
void |
setFrozen(boolean b)
RubyMethod setFrozen. |
void |
setTaint(boolean b)
RubyMethod setTaint. |
void |
setUntrusted(boolean b)
RubyMethod setUntrusted. |
void |
setVariable(int index,
java.lang.Object value)
|
void |
syncVariables(IRubyObject source)
Sets object's variables to those in the supplied object, removing/replacing any previously defined variables of the same name. |
void |
syncVariables(java.util.List<Variable<java.lang.Object>> variables)
Deprecated. |
java.lang.Object |
toJava(java.lang.Class cls)
Convert the object to the specified Java class, if possible. |
Field Detail |
---|
static final IRubyObject[] NULL_ARRAY
Method Detail |
---|
@Deprecated IRubyObject callSuper(ThreadContext context, IRubyObject[] args, Block block)
IRubyObject callMethod(ThreadContext context, java.lang.String name)
IRubyObject callMethod(ThreadContext context, java.lang.String name, IRubyObject arg)
IRubyObject callMethod(ThreadContext context, java.lang.String name, IRubyObject[] args)
IRubyObject callMethod(ThreadContext context, java.lang.String name, IRubyObject[] args, Block block)
@Deprecated IRubyObject callMethod(ThreadContext context, int methodIndex, java.lang.String name)
@Deprecated IRubyObject callMethod(ThreadContext context, int methodIndex, java.lang.String name, IRubyObject arg)
IRubyObject checkCallMethod(ThreadContext context, java.lang.String name)
boolean isNil()
boolean isTrue()
boolean isTaint()
void setTaint(boolean b)
b
- IRubyObject infectBy(IRubyObject obj)
obj
-
boolean isFrozen()
void setFrozen(boolean b)
b
- boolean isUntrusted()
void setUntrusted(boolean b)
b
- boolean isImmediate()
RubyClass getMetaClass()
RubyClass getSingletonClass()
RubyClass getType()
boolean respondsTo(java.lang.String string)
string
-
boolean respondsToMissing(java.lang.String string)
string
-
boolean respondsToMissing(java.lang.String string, boolean priv)
string
-
Ruby getRuntime()
java.lang.Class getJavaClass()
java.lang.String asJavaString()
RubyString asString()
RubyArray convertToArray()
RubyHash convertToHash()
RubyFloat convertToFloat()
RubyInteger convertToInteger()
@Deprecated RubyInteger convertToInteger(int convertMethodIndex, java.lang.String convertMethod)
RubyInteger convertToInteger(java.lang.String convertMethod)
RubyString convertToString()
IRubyObject anyToString()
IRubyObject checkStringType()
IRubyObject checkStringType19()
IRubyObject checkArrayType()
java.lang.Object toJava(java.lang.Class cls)
cls
- The target type to which the object should be converted.IRubyObject dup()
IRubyObject inspect()
IRubyObject rbClone()
boolean isModule()
(someObject instanceof RubyModule)
instead.boolean isClass()
(someObject instanceof RubyClass/MetaClass)
instead.void dataWrapStruct(java.lang.Object obj)
obj
- the object to wrapjava.lang.Object dataGetStruct()
java.lang.Object dataGetStructChecked()
IRubyObject id()
IRubyObject op_equal(ThreadContext context, IRubyObject other)
IRubyObject op_eqq(ThreadContext context, IRubyObject other)
boolean eql(IRubyObject other)
void addFinalizer(IRubyObject finalizer)
void removeFinalizers()
boolean hasVariables()
int getVariableCount()
@Deprecated void syncVariables(java.util.List<Variable<java.lang.Object>> variables)
variables
- the variables to be set for objectvoid syncVariables(IRubyObject source)
source
- the source object containing the variables to syncjava.util.List<Variable<java.lang.Object>> getVariableList()
InstanceVariables getInstanceVariables()
InternalVariables getInternalVariables()
java.util.List<java.lang.String> getVariableNameList()
void copySpecialInstanceVariables(IRubyObject clone)
java.lang.Object getVariable(int index)
void setVariable(int index, java.lang.Object value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |