public class UndefinedValue extends Operand implements IRubyObject
| Modifier and Type | Field and Description |
|---|---|
static UndefinedValue |
UNDEFINED |
EMPTY_ARRAYNULL_ARRAY| Modifier and Type | Method and Description |
|---|---|
void |
addFinalizer(IRubyObject finalizer) |
void |
addUsedVariables(java.util.List<Variable> l)
Append the list of variables used in this operand to the input list -- force every operand
to implement this because a missing implementation can cause bad failures.
|
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.
|
boolean |
canCopyPropagate()
Can we replace every use of a variable 'v' that contains the value of this operand
with the operand itself? This takes importance when there are at least two uses
of 'v' within this scope.
|
IRubyObject |
checkArrayType() |
IRubyObject |
checkCallMethod(ThreadContext context,
JavaSites.CheckedSites sites) |
IRubyObject |
checkCallMethod(ThreadContext context,
java.lang.String name) |
IRubyObject |
checkStringType() |
Operand |
cloneForInlining(CloneInfo ii) |
RubyArray |
convertToArray()
Methods which perform to_xxx if the object has such a method
|
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.
|
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()
RubyMethod getRubyClass.
|
OperandType |
getOperandType() |
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)
Deprecated.
|
IRubyObject |
inspect()
RubyMethod inspect.
|
boolean |
isClass()
If is_a? semantics is required, use
(someObject instanceof RubyClass/MetaClass) instead. |
boolean |
isFrozen()
RubyMethod isFrozen.
|
boolean |
isImmediate() |
boolean |
isModule()
If is_a? semantics is required, use
(someObject instanceof RubyModule) instead. |
boolean |
isNil()
Check whether this object is nil.
|
boolean |
isSpecialConst() |
boolean |
isTaint()
Deprecated.
|
boolean |
isTrue()
Check whether this object is truthy.
|
boolean |
isUntrusted()
Deprecated.
|
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.
|
java.lang.Object |
retrieve(ThreadContext context,
IRubyObject self,
StaticScope currScope,
DynamicScope currDynScope,
java.lang.Object[] temp) |
void |
setFrozen(boolean b)
RubyMethod setFrozen.
|
void |
setTaint(boolean b)
Deprecated.
|
void |
setUntrusted(boolean b)
Deprecated.
|
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.
|
java.lang.String |
toString() |
void |
visit(IRVisitor visitor) |
encode, getSimplifiedOperand, getValue, hasKnownValue, isFalseyImmediate, isTruthyImmediateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitarray, checkStringType19, getMarshalVariableListpublic static final UndefinedValue UNDEFINED
public OperandType getOperandType()
getOperandType in class Operandpublic void addUsedVariables(java.util.List<Variable> l)
OperandaddUsedVariables in class Operandpublic Operand cloneForInlining(CloneInfo ii)
cloneForInlining in class Operandpublic boolean canCopyPropagate()
OperandcanCopyPropagate in class Operandpublic java.lang.Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, java.lang.Object[] temp)
@Deprecated public IRubyObject callSuper(ThreadContext context, IRubyObject[] args, Block block)
callSuper in interface IRubyObjectpublic IRubyObject callMethod(ThreadContext context, java.lang.String name)
callMethod in interface IRubyObjectpublic IRubyObject callMethod(ThreadContext context, java.lang.String name, IRubyObject arg)
callMethod in interface IRubyObjectpublic IRubyObject callMethod(ThreadContext context, java.lang.String name, IRubyObject[] args)
callMethod in interface IRubyObjectpublic IRubyObject callMethod(ThreadContext context, java.lang.String name, IRubyObject[] args, Block block)
callMethod in interface IRubyObject@Deprecated public IRubyObject callMethod(ThreadContext context, int methodIndex, java.lang.String name)
callMethod in interface IRubyObject@Deprecated public IRubyObject callMethod(ThreadContext context, int methodIndex, java.lang.String name, IRubyObject arg)
callMethod in interface IRubyObjectpublic IRubyObject checkCallMethod(ThreadContext context, java.lang.String name)
checkCallMethod in interface IRubyObjectpublic IRubyObject checkCallMethod(ThreadContext context, JavaSites.CheckedSites sites)
checkCallMethod in interface IRubyObjectpublic boolean isNil()
IRubyObjectisNil in interface IRubyObjectnil onlypublic boolean isTrue()
IRubyObjectisTrue in interface IRubyObjectpublic boolean isFrozen()
isFrozen in interface IRubyObjectpublic void setFrozen(boolean b)
setFrozen in interface IRubyObjectb - public boolean isImmediate()
isImmediate in interface IRubyObjectpublic boolean isSpecialConst()
isSpecialConst in interface IRubyObjectpublic RubyClass getMetaClass()
getMetaClass in interface IRubyObjectpublic RubyClass getSingletonClass()
getSingletonClass in interface IRubyObjectpublic RubyClass getType()
getType in interface IRubyObjectpublic boolean respondsTo(java.lang.String string)
respondsTo in interface IRubyObjectstring - public boolean respondsToMissing(java.lang.String string)
respondsToMissing in interface IRubyObjectstring - public boolean respondsToMissing(java.lang.String string,
boolean priv)
respondsToMissing in interface IRubyObjectstring - public Ruby getRuntime()
getRuntime in interface IRubyObjectpublic java.lang.Class getJavaClass()
getJavaClass in interface IRubyObjectpublic java.lang.String asJavaString()
asJavaString in interface IRubyObjectpublic RubyString asString()
asString in interface IRubyObjectpublic RubyArray convertToArray()
convertToArray in interface IRubyObjectpublic RubyHash convertToHash()
IRubyObjectconvertToHash in interface IRubyObjectpublic RubyFloat convertToFloat()
IRubyObjectconvertToFloat in interface IRubyObjectpublic RubyInteger convertToInteger()
IRubyObjectconvertToInteger in interface IRubyObject@Deprecated public RubyInteger convertToInteger(int convertMethodIndex, java.lang.String convertMethod)
convertToInteger in interface IRubyObjectIRubyObject.convertToInteger(String)public RubyInteger convertToInteger(java.lang.String convertMethod)
IRubyObjectconvertToInteger in interface IRubyObjectconvertMethod - method to use e.g. to_ipublic RubyString convertToString()
IRubyObjectconvertToString in interface IRubyObjectpublic IRubyObject anyToString()
anyToString in interface IRubyObjectpublic IRubyObject checkStringType()
checkStringType in interface IRubyObjectpublic IRubyObject checkArrayType()
checkArrayType in interface IRubyObjectpublic java.lang.Object toJava(java.lang.Class cls)
toJava in interface IRubyObjectcls - The target type to which the object should be converted.public IRubyObject dup()
dup in interface IRubyObjectpublic IRubyObject inspect()
inspect in interface IRubyObjectpublic IRubyObject rbClone()
rbClone in interface IRubyObjectpublic boolean isModule()
IRubyObject(someObject instanceof RubyModule) instead.isModule in interface IRubyObject(someObject instanceof RubyModule) instead.public boolean isClass()
IRubyObject(someObject instanceof RubyClass/MetaClass) instead.isClass in interface IRubyObject(someObject instanceof RubyClass/MetaClass) instead.public void dataWrapStruct(java.lang.Object obj)
dataWrapStruct in interface IRubyObjectobj - the object to wrappublic java.lang.Object dataGetStruct()
dataGetStruct in interface IRubyObjectpublic IRubyObject id()
id in interface IRubyObjectpublic IRubyObject op_equal(ThreadContext context, IRubyObject other)
op_equal in interface IRubyObjectpublic IRubyObject op_eqq(ThreadContext context, IRubyObject other)
op_eqq in interface IRubyObjectpublic boolean eql(IRubyObject other)
eql in interface IRubyObjectpublic void addFinalizer(IRubyObject finalizer)
addFinalizer in interface IRubyObjectpublic void removeFinalizers()
removeFinalizers in interface IRubyObjectpublic boolean hasVariables()
hasVariables in interface IRubyObjectpublic int getVariableCount()
getVariableCount in interface IRubyObject@Deprecated public void syncVariables(java.util.List<Variable<java.lang.Object>> variables)
syncVariables in interface IRubyObjectvariables - the variables to be set for objectpublic void syncVariables(IRubyObject source)
syncVariables in interface IRubyObjectsource - the source object containing the variables to syncpublic java.util.List<Variable<java.lang.Object>> getVariableList()
getVariableList in interface IRubyObjectpublic InstanceVariables getInstanceVariables()
getInstanceVariables in interface IRubyObjectpublic InternalVariables getInternalVariables()
getInternalVariables in interface IRubyObjectpublic java.util.List<java.lang.String> getVariableNameList()
getVariableNameList in interface IRubyObjectpublic void copySpecialInstanceVariables(IRubyObject clone)
copySpecialInstanceVariables in interface IRubyObjectpublic java.lang.Object getVariable(int index)
getVariable in interface IRubyObjectpublic void setVariable(int index,
java.lang.Object value)
setVariable in interface IRubyObjectpublic java.lang.String toString()
toString in class java.lang.Object@Deprecated public java.lang.Object dataGetStructChecked()
dataGetStructChecked in interface IRubyObject@Deprecated public boolean isTaint()
isTaint in interface IRubyObject@Deprecated public void setTaint(boolean b)
setTaint in interface IRubyObject@Deprecated public IRubyObject infectBy(IRubyObject obj)
infectBy in interface IRubyObject@Deprecated public boolean isUntrusted()
IRubyObjectisUntrusted in interface IRubyObject@Deprecated public void setUntrusted(boolean b)
IRubyObjectsetUntrusted in interface IRubyObjectCopyright © 2001-2023 JRuby. All Rights Reserved.