public interface IRubyObject
Modifier and Type | Field and Description |
---|---|
static IRubyObject[] |
NULL_ARRAY |
Modifier and Type | Method and Description |
---|---|
void |
addFinalizer(IRubyObject finalizer) |
IRubyObject |
anyToString() |
String |
asJavaString()
Convert the object into a symbol name if possible.
|
RubyString |
asString()
rb_obj_as_string
|
IRubyObject |
callMethod(ThreadContext context,
int methodIndex,
String name)
Deprecated.
|
IRubyObject |
callMethod(ThreadContext context,
int methodIndex,
String name,
IRubyObject arg)
Deprecated.
|
IRubyObject |
callMethod(ThreadContext context,
String name) |
IRubyObject |
callMethod(ThreadContext context,
String name,
IRubyObject arg) |
IRubyObject |
callMethod(ThreadContext context,
String name,
IRubyObject[] args) |
IRubyObject |
callMethod(ThreadContext context,
String name,
IRubyObject[] args,
Block block) |
IRubyObject |
callSuper(ThreadContext context,
IRubyObject[] args,
Block block)
Deprecated.
|
IRubyObject |
checkArrayType() |
IRubyObject |
checkCallMethod(ThreadContext context,
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,
String convertMethod)
Deprecated.
|
RubyInteger |
convertToInteger(String convertMethod) |
RubyString |
convertToString() |
void |
copySpecialInstanceVariables(IRubyObject clone) |
Object |
dataGetStruct()
Our version of Data_Get_Struct.
|
Object |
dataGetStructChecked() |
void |
dataWrapStruct(Object obj)
Our version of Data_Wrap_Struct.
|
IRubyObject |
dup()
RubyMethod dup.
|
boolean |
eql(IRubyObject other) |
InstanceVariables |
getInstanceVariables() |
InternalVariables |
getInternalVariables() |
Class |
getJavaClass()
RubyMethod getJavaClass.
|
RubyClass |
getMetaClass()
RubyMethod getRubyClass.
|
Ruby |
getRuntime()
RubyMethod getRuntime.
|
RubyClass |
getSingletonClass()
RubyMethod getSingletonClass.
|
RubyClass |
getType()
RubyMethod getType.
|
Object |
getVariable(int index) |
int |
getVariableCount() |
List<Variable<Object>> |
getVariableList() |
List<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(String string)
RubyMethod respondsTo.
|
boolean |
respondsToMissing(String string)
RubyMethod respondsTo.
|
boolean |
respondsToMissing(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,
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(List<Variable<Object>> variables)
Deprecated.
|
Object |
toJava(Class cls)
Convert the object to the specified Java class, if possible.
|
static final IRubyObject[] NULL_ARRAY
@Deprecated IRubyObject callSuper(ThreadContext context, IRubyObject[] args, Block block)
IRubyObject callMethod(ThreadContext context, String name)
IRubyObject callMethod(ThreadContext context, String name, IRubyObject arg)
IRubyObject callMethod(ThreadContext context, String name, IRubyObject[] args)
IRubyObject callMethod(ThreadContext context, String name, IRubyObject[] args, Block block)
@Deprecated IRubyObject callMethod(ThreadContext context, int methodIndex, String name)
@Deprecated IRubyObject callMethod(ThreadContext context, int methodIndex, String name, IRubyObject arg)
IRubyObject checkCallMethod(ThreadContext context, 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(String string)
string
- boolean respondsToMissing(String string)
string
- boolean respondsToMissing(String string, boolean priv)
string
- Ruby getRuntime()
Class getJavaClass()
String asJavaString()
RubyString asString()
RubyArray convertToArray()
RubyHash convertToHash()
RubyFloat convertToFloat()
RubyInteger convertToInteger()
@Deprecated RubyInteger convertToInteger(int convertMethodIndex, String convertMethod)
RubyInteger convertToInteger(String convertMethod)
RubyString convertToString()
IRubyObject anyToString()
IRubyObject checkStringType()
IRubyObject checkStringType19()
IRubyObject checkArrayType()
Object toJava(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(Object obj)
obj
- the object to wrapObject dataGetStruct()
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(List<Variable<Object>> variables)
variables
- the variables to be set for objectvoid syncVariables(IRubyObject source)
source
- the source object containing the variables to syncList<Variable<Object>> getVariableList()
InstanceVariables getInstanceVariables()
InternalVariables getInternalVariables()
List<String> getVariableNameList()
void copySpecialInstanceVariables(IRubyObject clone)
Object getVariable(int index)
void setVariable(int index, Object value)
Copyright © 2001-2015 JRuby. All Rights Reserved.