Top Description Fields Constructors Methods
org.jruby.ir.operands

public Class UndefinedValue

extends Operand
implements IRubyObject
Class Inheritance
All Implemented Interfaces
org.jruby.runtime.builtin.IRubyObject
Imports
org.jruby.*, org.jruby.ir.IRVisitor, org.jruby.ir.transformations.inlining.CloneInfo, org.jruby.parser.StaticScope, org.jruby.runtime.Block, .DynamicScope, .JavaSites, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, .InstanceVariables, .InternalVariables, .Variable, java.util.List

For argument processing. If an opt arg does not exist we will return this so instrs can reason about non-existent arguments. Since this value can be temporarily stored in a binding, we need it to be an IRubyObject as well. But since it can never really participate in any operation, all calls throw a runtime exception.

Field Summary

Modifier and TypeField and Description
public static final UndefinedValue
Inherited from org.jruby.ir.operands.Operand:
EMPTY_ARRAY

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
public IRubyObject
public void
addUsedVariables(List<Variable> l)

Implements abstract org.jruby.ir.operands.Operand.addUsedVariables.

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.

public IRubyObject
anyToString()

Implements org.jruby.runtime.builtin.IRubyObject.anyToString.

make this object into a string (hopefully)

public String
asJavaString()

Implements org.jruby.runtime.builtin.IRubyObject.asJavaString.

Convert the object into a symbol name if possible.

public RubyString
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
callMethod(ThreadContext context, int methodIndex, String name)

Implements org.jruby.runtime.builtin.IRubyObject.callMethod.

Deprecated

public IRubyObject
callMethod(ThreadContext context, int methodIndex, String name, IRubyObject arg)

Implements org.jruby.runtime.builtin.IRubyObject.callMethod.

Deprecated

public IRubyObject
public boolean
canCopyPropagate()

Overrides org.jruby.ir.operands.Operand.canCopyPropagate.

Can we replace every use of a variable 'v' that contains the value of this operand with the operand itself?

public IRubyObject
checkArrayType()

Implements org.jruby.runtime.builtin.IRubyObject.checkArrayType.

is this an array if so return it otherwise nil

public IRubyObject
public IRubyObject
public IRubyObject
checkStringType()

Implements org.jruby.runtime.builtin.IRubyObject.checkStringType.

is this a string if so return it otherwise nil

public Operand
public RubyArray<T extends IRubyObject>
convertToArray()

Implements org.jruby.runtime.builtin.IRubyObject.convertToArray.

Converts this Ruby object to an Array.

public RubyFloat
convertToFloat()

Implements org.jruby.runtime.builtin.IRubyObject.convertToFloat.

Converts this Ruby object to a Float (using to_f).

public RubyHash
convertToHash()

Implements org.jruby.runtime.builtin.IRubyObject.convertToHash.

Converts this Ruby object to a Hash.

public RubyInteger
convertToInteger()

Implements org.jruby.runtime.builtin.IRubyObject.convertToInteger.

Converts this Ruby object to an Integer.

public RubyInteger
convertToInteger(String
method to use e.g. to_i
convertMethod
)

Implements org.jruby.runtime.builtin.IRubyObject.convertToInteger.

Converts this Ruby object to an Integer.

public RubyString
convertToString()

Implements org.jruby.runtime.builtin.IRubyObject.convertToString.

Converts this Ruby object to a String.

public void
public Object

Returns:

the object wrapped.
dataGetStruct
()

Implements org.jruby.runtime.builtin.IRubyObject.dataGetStruct.

Our version of Data_Get_Struct.

public Object
public void
dataWrapStruct(Object
the object to wrap
obj
)

Implements org.jruby.runtime.builtin.IRubyObject.dataWrapStruct.

Our version of Data_Wrap_Struct.

public IRubyObject
dup()

Implements org.jruby.runtime.builtin.IRubyObject.dup.

RubyMethod dup.

public boolean
public InstanceVariables
public InternalVariables
public Class<T>
public RubyClass
public OperandType
public Ruby
public RubyClass
public RubyClass
getType()

Implements org.jruby.runtime.builtin.IRubyObject.getType.

RubyMethod getType.

public Object
public int
public List<Variable<Object>>
public List<String>
public boolean
hasVariables()

Implements org.jruby.runtime.builtin.IRubyObject.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
public IRubyObject
id()

Implements org.jruby.runtime.builtin.IRubyObject.id.

The id of the object

public IRubyObject
public IRubyObject
inspect()

Implements org.jruby.runtime.builtin.IRubyObject.inspect.

RubyMethod inspect.

public boolean

Returns:

true if an object is Ruby Class instance (note that it will return false for Ruby singleton classes). If is_a? semantics is required, use (someObject instanceof RubyClass/MetaClass) instead.
isClass
()

Implements org.jruby.runtime.builtin.IRubyObject.isClass.

If is_a?

public boolean

Returns:

boolean
isFrozen
()

Implements org.jruby.runtime.builtin.IRubyObject.isFrozen.

RubyMethod isFrozen.

public boolean
isImmediate()

Implements org.jruby.runtime.builtin.IRubyObject.isImmediate.

Is this an immediate object

public boolean

Returns:

true if an object is Ruby Module instance (note that it will return false for Ruby Classes). If is_a? semantics is required, use (someObject instanceof RubyModule) instead.
isModule
()

Implements org.jruby.runtime.builtin.IRubyObject.isModule.

If is_a?

public boolean
isNil()

Implements org.jruby.runtime.builtin.IRubyObject.isNil.

Check whether this object is nil.

public boolean
public boolean
public boolean
isTrue()

Implements org.jruby.runtime.builtin.IRubyObject.isTrue.

Check whether this object is truthy.

public boolean
isUntrusted()

Implements org.jruby.runtime.builtin.IRubyObject.isUntrusted.

Deprecated

RubyMethod isUntrusted.

public IRubyObject
public IRubyObject
public IRubyObject

Returns:

IRubyObject
rbClone
()

Implements org.jruby.runtime.builtin.IRubyObject.rbClone.

RubyMethod rbClone.

public void
public boolean
respondsTo(String
method name
string
)

Implements org.jruby.runtime.builtin.IRubyObject.respondsTo.

RubyMethod respondsTo.

public boolean
respondsToMissing(String
method name
string
)

Implements org.jruby.runtime.builtin.IRubyObject.respondsToMissing.

RubyMethod respondsTo.

public boolean
respondsToMissing(String
method name
string
,
boolean
private?
priv
)

Implements org.jruby.runtime.builtin.IRubyObject.respondsToMissing.

RubyMethod respondsTo.

public Object
public void
setFrozen(boolean b)

Implements org.jruby.runtime.builtin.IRubyObject.setFrozen.

RubyMethod setFrozen.

public void
public void
setUntrusted(boolean
boolean
b
)

Implements org.jruby.runtime.builtin.IRubyObject.setUntrusted.

Deprecated

RubyMethod setUntrusted.

public void
public RubyClass
public void
syncVariables(List<Variable<Object>>
the variables to be set for object
variables
)

Implements org.jruby.runtime.builtin.IRubyObject.syncVariables.

Deprecated

Sets object's variables to those in the supplied list, removing/replacing any previously defined variables.

public void
syncVariables(IRubyObject
the source object containing the variables to sync
source
)

Implements org.jruby.runtime.builtin.IRubyObject.syncVariables.

Sets object's variables to those in the supplied object, removing/replacing any previously defined variables of the same name.

public Object
toJava(Class<T>
The target type to which the object should be converted.
cls
)

Implements org.jruby.runtime.builtin.IRubyObject.toJava.

Convert the object to the specified Java class, if possible.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

private RuntimeException
public void
Inherited from org.jruby.ir.operands.Operand:
encodegetSimplifiedOperandgetValuehasKnownValueisFalseyImmediateisTruthyImmediate