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() |
static IRubyObject[] |
array(int length) |
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,
JavaSites.CheckedSites sites) |
IRubyObject |
checkCallMethod(ThreadContext context,
java.lang.String name) |
IRubyObject |
checkStringType() |
default IRubyObject |
checkStringType19()
Deprecated.
Use
checkStringType() instead. |
RubyArray |
convertToArray()
Converts this Ruby object to an Array.
|
RubyFloat |
convertToFloat()
Converts this Ruby object to a Float (using to_f).
|
RubyHash |
convertToHash()
Converts this Ruby object to a Hash.
|
RubyInteger |
convertToInteger()
Converts this Ruby object to an Integer.
|
default RubyInteger |
convertToInteger(int convertMethodIndex,
java.lang.String convertMethod)
Deprecated.
|
RubyInteger |
convertToInteger(java.lang.String convertMethod)
Converts this Ruby object to an Integer.
|
RubyString |
convertToString()
Converts this Ruby object to a String.
|
void |
copySpecialInstanceVariables(IRubyObject clone) |
java.lang.Object |
dataGetStruct()
Our version of Data_Get_Struct.
|
java.lang.Object |
dataGetStructChecked()
Deprecated.
|
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()
Retrieve
>self.class<. |
Ruby |
getRuntime()
RubyMethod getRuntime.
|
RubyClass |
getSingletonClass()
Retrieve
>self.singleton_class<. |
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()
Check whether this object is nil.
|
boolean |
isSpecialConst() |
boolean |
isTaint()
RubyMethod isTaint.
|
boolean |
isTrue()
Check whether this object is truthy.
|
boolean |
isUntrusted()
RubyMethod isUntrusted.
|
IRubyObject |
op_eqq(ThreadContext context,
IRubyObject other) |
IRubyObject |
op_equal(ThreadContext context,
IRubyObject other) |
IRubyObject |
rbClone()
RubyMethod clone.
|
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 taint)
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.
|
<T> T |
toJava(java.lang.Class<T> type)
Convert the object to the specified Java class, if possible.
|
static final IRubyObject[] NULL_ARRAY
static IRubyObject[] array(int length)
@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)
IRubyObject checkCallMethod(ThreadContext context, JavaSites.CheckedSites sites)
boolean isNil()
nil onlyboolean isTrue()
nil and false, true otherwiseboolean isTaint()
void setTaint(boolean taint)
taint - the taint flagIRubyObject infectBy(IRubyObject obj)
obj - boolean isFrozen()
void setFrozen(boolean b)
b - boolean isUntrusted()
void setUntrusted(boolean b)
b - boolean isImmediate()
boolean isSpecialConst()
RubyClass getMetaClass()
>self.class<.RubyClass getSingletonClass()
>self.singleton_class<.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()
RubyInteger convertToInteger(java.lang.String convertMethod)
convertMethod - method to use e.g. to_iRubyString convertToString()
IRubyObject anyToString()
IRubyObject checkStringType()
IRubyObject checkArrayType()
<T> T toJava(java.lang.Class<T> type)
type - 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()
@Deprecated 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)
default IRubyObject checkStringType19()
checkStringType() instead.@Deprecated default RubyInteger convertToInteger(int convertMethodIndex, java.lang.String convertMethod)
convertMethod - convertMethodIndex - convertToInteger(String)Copyright © 2001-2019 JRuby. All Rights Reserved.