public class UndefinedValue extends Operand implements IRubyObject
Modifier and Type | Field and Description |
---|---|
static UndefinedValue |
UNDEFINED |
EMPTY_ARRAY
NULL_ARRAY
Modifier and Type | Method and Description |
---|---|
void |
addFinalizer(IRubyObject finalizer) |
void |
addUsedVariables(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() |
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.
|
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,
String name) |
IRubyObject |
checkStringType() |
IRubyObject |
checkStringType19() |
Operand |
cloneForInlining(CloneInfo ii) |
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 |
isSpecialConst() |
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.
|
Object |
retrieve(ThreadContext context,
IRubyObject self,
StaticScope currScope,
DynamicScope currDynScope,
Object[] temp) |
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.
|
String |
toString() |
void |
visit(IRVisitor visitor) |
encode, getOperandType, getSimplifiedOperand, getValue, hasKnownValue
public static final UndefinedValue UNDEFINED
public void addUsedVariables(List<Variable> l)
Operand
addUsedVariables
in class Operand
public Operand cloneForInlining(CloneInfo ii)
cloneForInlining
in class Operand
public boolean canCopyPropagate()
Operand
canCopyPropagate
in class Operand
public Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp)
@Deprecated public IRubyObject callSuper(ThreadContext context, IRubyObject[] args, Block block)
callSuper
in interface IRubyObject
public IRubyObject callMethod(ThreadContext context, String name)
callMethod
in interface IRubyObject
public IRubyObject callMethod(ThreadContext context, String name, IRubyObject arg)
callMethod
in interface IRubyObject
public IRubyObject callMethod(ThreadContext context, String name, IRubyObject[] args)
callMethod
in interface IRubyObject
public IRubyObject callMethod(ThreadContext context, String name, IRubyObject[] args, Block block)
callMethod
in interface IRubyObject
@Deprecated public IRubyObject callMethod(ThreadContext context, int methodIndex, String name)
callMethod
in interface IRubyObject
@Deprecated public IRubyObject callMethod(ThreadContext context, int methodIndex, String name, IRubyObject arg)
callMethod
in interface IRubyObject
public IRubyObject checkCallMethod(ThreadContext context, String name)
checkCallMethod
in interface IRubyObject
public boolean isNil()
IRubyObject
isNil
in interface IRubyObject
public boolean isTrue()
isTrue
in interface IRubyObject
public boolean isTaint()
isTaint
in interface IRubyObject
public void setTaint(boolean b)
setTaint
in interface IRubyObject
b
- public IRubyObject infectBy(IRubyObject obj)
infectBy
in interface IRubyObject
obj
- public boolean isFrozen()
isFrozen
in interface IRubyObject
public void setFrozen(boolean b)
setFrozen
in interface IRubyObject
b
- public boolean isUntrusted()
isUntrusted
in interface IRubyObject
public void setUntrusted(boolean b)
setUntrusted
in interface IRubyObject
b
- public boolean isImmediate()
isImmediate
in interface IRubyObject
public boolean isSpecialConst()
isSpecialConst
in interface IRubyObject
public RubyClass getMetaClass()
getMetaClass
in interface IRubyObject
public RubyClass getSingletonClass()
getSingletonClass
in interface IRubyObject
public RubyClass getType()
getType
in interface IRubyObject
public boolean respondsTo(String string)
respondsTo
in interface IRubyObject
string
- public boolean respondsToMissing(String string)
respondsToMissing
in interface IRubyObject
string
- public boolean respondsToMissing(String string, boolean priv)
respondsToMissing
in interface IRubyObject
string
- public Ruby getRuntime()
getRuntime
in interface IRubyObject
public Class getJavaClass()
getJavaClass
in interface IRubyObject
public String asJavaString()
asJavaString
in interface IRubyObject
public RubyString asString()
asString
in interface IRubyObject
public RubyArray convertToArray()
convertToArray
in interface IRubyObject
public RubyHash convertToHash()
convertToHash
in interface IRubyObject
public RubyFloat convertToFloat()
convertToFloat
in interface IRubyObject
public RubyInteger convertToInteger()
convertToInteger
in interface IRubyObject
@Deprecated public RubyInteger convertToInteger(int convertMethodIndex, String convertMethod)
convertToInteger
in interface IRubyObject
public RubyInteger convertToInteger(String convertMethod)
convertToInteger
in interface IRubyObject
public RubyString convertToString()
convertToString
in interface IRubyObject
public IRubyObject anyToString()
anyToString
in interface IRubyObject
public IRubyObject checkStringType()
checkStringType
in interface IRubyObject
public IRubyObject checkStringType19()
checkStringType19
in interface IRubyObject
public IRubyObject checkArrayType()
checkArrayType
in interface IRubyObject
public Object toJava(Class cls)
toJava
in interface IRubyObject
cls
- The target type to which the object should be converted.public IRubyObject dup()
dup
in interface IRubyObject
public IRubyObject inspect()
inspect
in interface IRubyObject
public IRubyObject rbClone()
rbClone
in interface IRubyObject
public boolean isModule()
isModule
in interface IRubyObject
(someObject instanceof RubyModule)
instead.public boolean isClass()
isClass
in interface IRubyObject
(someObject instanceof RubyClass/MetaClass)
instead.public void dataWrapStruct(Object obj)
dataWrapStruct
in interface IRubyObject
obj
- the object to wrappublic Object dataGetStruct()
dataGetStruct
in interface IRubyObject
public Object dataGetStructChecked()
dataGetStructChecked
in interface IRubyObject
public IRubyObject id()
id
in interface IRubyObject
public IRubyObject op_equal(ThreadContext context, IRubyObject other)
op_equal
in interface IRubyObject
public IRubyObject op_eqq(ThreadContext context, IRubyObject other)
op_eqq
in interface IRubyObject
public boolean eql(IRubyObject other)
eql
in interface IRubyObject
public void addFinalizer(IRubyObject finalizer)
addFinalizer
in interface IRubyObject
public void removeFinalizers()
removeFinalizers
in interface IRubyObject
public boolean hasVariables()
hasVariables
in interface IRubyObject
public int getVariableCount()
getVariableCount
in interface IRubyObject
@Deprecated public void syncVariables(List<Variable<Object>> variables)
syncVariables
in interface IRubyObject
variables
- the variables to be set for objectpublic void syncVariables(IRubyObject source)
syncVariables
in interface IRubyObject
source
- the source object containing the variables to syncpublic List<Variable<Object>> getVariableList()
getVariableList
in interface IRubyObject
public InstanceVariables getInstanceVariables()
getInstanceVariables
in interface IRubyObject
public InternalVariables getInternalVariables()
getInternalVariables
in interface IRubyObject
public List<String> getVariableNameList()
getVariableNameList
in interface IRubyObject
public void copySpecialInstanceVariables(IRubyObject clone)
copySpecialInstanceVariables
in interface IRubyObject
public Object getVariable(int index)
getVariable
in interface IRubyObject
public void setVariable(int index, Object value)
setVariable
in interface IRubyObject
Copyright © 2001-2015 JRuby. All Rights Reserved.