org.jruby
Class RubyUndef

java.lang.Object
  extended by org.jruby.RubyUndef
All Implemented Interfaces:
IRubyObject

public class RubyUndef
extends java.lang.Object
implements IRubyObject


Field Summary
 
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY
 
Constructor Summary
RubyUndef()
           
 
Method Summary
 void addFinalizer(RubyProc finalizer)
           
 IRubyObject anyToString()
           
 RubyString asString()
          rb_obj_as_string
 java.lang.String asSymbol()
          Convert the object into a symbol name if possible.
 IRubyObject callMethod(ThreadContext context, int methodIndex, java.lang.String string)
           
 IRubyObject callMethod(ThreadContext context, int methodIndex, java.lang.String name, IRubyObject arg)
           
 IRubyObject callMethod(ThreadContext context, int methodIndex, java.lang.String name, IRubyObject[] args)
           
 IRubyObject callMethod(ThreadContext context, int methodIndex, java.lang.String name, IRubyObject[] args, CallType callType)
           
 IRubyObject callMethod(ThreadContext context, RubyModule rubyclass, int methodIndex, java.lang.String name, IRubyObject[] args, CallType callType, Block block)
           
 IRubyObject callMethod(ThreadContext context, RubyModule rubyclass, java.lang.String name, IRubyObject[] args, CallType callType, Block block)
           
 IRubyObject callMethod(ThreadContext context, java.lang.String string)
           
 IRubyObject callMethod(ThreadContext context, java.lang.String string, Block aBlock)
           
 IRubyObject callMethod(ThreadContext context, java.lang.String string, IRubyObject arg)
           
 IRubyObject callMethod(ThreadContext context, java.lang.String method, IRubyObject[] rubyArgs)
           
 IRubyObject callMethod(ThreadContext context, java.lang.String method, IRubyObject[] rubyArgs, Block block)
           
 IRubyObject callMethod(ThreadContext context, java.lang.String name, IRubyObject[] args, CallType callType)
           
 IRubyObject callMethod(ThreadContext context, java.lang.String name, IRubyObject[] args, CallType callType, Block block)
           
 IRubyObject callSuper(ThreadContext context, IRubyObject[] args, Block block)
           
 IRubyObject checkArrayType()
           
 IRubyObject checkStringType()
           
 IRubyObject compilerCallMethod(ThreadContext context, java.lang.String name, IRubyObject[] args, IRubyObject caller, CallType callType, Block block)
           
 IRubyObject compilerCallMethodWithIndex(ThreadContext context, int methodIndex, java.lang.String name, IRubyObject[] args, IRubyObject caller, CallType callType, Block block)
           
 RubyArray convertToArray()
          Methods which perform to_xxx if the object has such a method
 RubyFloat convertToFloat()
           
 RubyHash convertToHash()
           
 RubyInteger convertToInteger()
           
 RubyString convertToString()
           
 IRubyObject convertToType(RubyClass targetType, int convertMethodIndex, java.lang.String convertMethod, boolean raiseOnError)
          Converts this object to type 'targetType' using 'convertMethod' method (MRI: convert_type).
 IRubyObject convertToType(RubyClass targetType, int convertMethodIndex, java.lang.String convertMethod, boolean raiseOnMissingMethod, boolean raiseOnWrongTypeResult, boolean allowNilThrough)
           
 IRubyObject convertToTypeWithCheck(RubyClass targetType, int convertMethodIndex, java.lang.String convertMethod)
          Higher level conversion utility similiar to convertToType but it can throw an additional TypeError during conversion (MRI: rb_check_convert_type).
 java.lang.Object dataGetStruct()
          Our version of Data_Get_Struct.
 void dataWrapStruct(java.lang.Object obj)
          Our version of Data_Wrap_Struct.
 IRubyObject dup()
          RubyMethod dup.
 boolean eql(IRubyObject other)
           
 boolean eqlInternal(ThreadContext context, IRubyObject other)
           
 IRubyObject equal(IRubyObject other)
           
 IRubyObject equalInternal(ThreadContext context, IRubyObject other)
           
 IRubyObject evalSimple(ThreadContext context, IRubyObject evalString, java.lang.String file)
          Evaluate the given string.
 IRubyObject evalWithBinding(ThreadContext context, IRubyObject evalString, IRubyObject binding, java.lang.String file, int lineNumber)
          Evaluate the given string under the specified binding object.
 IRubyObject getInstanceVariable(java.lang.String string)
          RubyMethod getInstanceVar.
 java.util.Map getInstanceVariables()
           
 java.util.Map getInstanceVariablesSnapshot()
           
 java.lang.Class getJavaClass()
          RubyMethod getJavaClass.
 RubyClass getMetaClass()
          RubyMethod getRubyClass.
 int getNativeTypeIndex()
          Return the ClassIndex value for the native type this object was constructed from.
 Ruby getRuntime()
          RubyMethod getRuntime.
 RubyClass getSingletonClass()
          RubyMethod getSingletonClass.
 RubyClass getType()
          RubyMethod getType.
 RubyFixnum id()
           
 IRubyObject infectBy(IRubyObject obj)
          Infect this object using the taint of another object
 IRubyObject inspect()
          RubyMethod inspect.
 java.util.Iterator instanceVariableNames()
           
 boolean isFrozen()
          RubyMethod isFrozen.
 boolean isImmediate()
           
 boolean isKindOf(RubyModule rubyClass)
          RubyMethod isKindOf.
 boolean isNil()
          RubyMethod isNil.
 boolean isSingleton()
           
 boolean isTaint()
          RubyMethod isTaint.
 boolean isTrue()
           
 IRubyObject rbClone(Block unusedBlock)
          RubyMethod rbClone.
 void removeFinalizers()
           
 boolean respondsTo(java.lang.String string)
          RubyMethod respondsTo.
 java.util.Map safeGetInstanceVariables()
          Gets a copy of the instance variables for this object, if any exist.
 boolean safeHasInstanceVariables()
          Returns true if the object has any instance variables, false otherwise.
 void setFrozen(boolean b)
          RubyMethod setFrozen.
 IRubyObject setInstanceVariable(java.lang.String string, IRubyObject rubyObject)
          RubyMethod setInstanceVar.
 void setInstanceVariables(java.util.Map instanceVariables)
           
 void setMetaClass(RubyClass metaClass)
           
 void setTaint(boolean b)
          RubyMethod setTaint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RubyUndef

public RubyUndef()
Method Detail

addFinalizer

public void addFinalizer(RubyProc finalizer)
Specified by:
addFinalizer in interface IRubyObject

anyToString

public IRubyObject anyToString()
Specified by:
anyToString in interface IRubyObject
Returns:

asString

public RubyString asString()
Description copied from interface: IRubyObject
rb_obj_as_string

Specified by:
asString in interface IRubyObject
Returns:

asSymbol

public java.lang.String asSymbol()
Description copied from interface: IRubyObject
Convert the object into a symbol name if possible.

Specified by:
asSymbol in interface IRubyObject
Returns:
String the symbol name

callMethod

public IRubyObject callMethod(ThreadContext context,
                              RubyModule rubyclass,
                              java.lang.String name,
                              IRubyObject[] args,
                              CallType callType,
                              Block block)
Specified by:
callMethod in interface IRubyObject
Returns:

callMethod

public IRubyObject callMethod(ThreadContext context,
                              RubyModule rubyclass,
                              int methodIndex,
                              java.lang.String name,
                              IRubyObject[] args,
                              CallType callType,
                              Block block)
Specified by:
callMethod in interface IRubyObject
Returns:

callMethod

public IRubyObject callMethod(ThreadContext context,
                              int methodIndex,
                              java.lang.String name,
                              IRubyObject arg)
Specified by:
callMethod in interface IRubyObject
Returns:

callMethod

public IRubyObject callMethod(ThreadContext context,
                              int methodIndex,
                              java.lang.String name,
                              IRubyObject[] args)
Specified by:
callMethod in interface IRubyObject
Returns:

callMethod

public IRubyObject callMethod(ThreadContext context,
                              int methodIndex,
                              java.lang.String name,
                              IRubyObject[] args,
                              CallType callType)
Specified by:
callMethod in interface IRubyObject
Returns:

callMethod

public IRubyObject callMethod(ThreadContext context,
                              java.lang.String name,
                              IRubyObject[] args,
                              CallType callType)
Specified by:
callMethod in interface IRubyObject
Returns:

callMethod

public IRubyObject callMethod(ThreadContext context,
                              java.lang.String name,
                              IRubyObject[] args,
                              CallType callType,
                              Block block)
Specified by:
callMethod in interface IRubyObject
Returns:

callMethod

public IRubyObject callMethod(ThreadContext context,
                              java.lang.String string)
Specified by:
callMethod in interface IRubyObject
Returns:

callMethod

public IRubyObject callMethod(ThreadContext context,
                              int methodIndex,
                              java.lang.String string)
Specified by:
callMethod in interface IRubyObject
Returns:

callMethod

public IRubyObject callMethod(ThreadContext context,
                              java.lang.String string,
                              Block aBlock)
Specified by:
callMethod in interface IRubyObject
Returns:

callMethod

public IRubyObject callMethod(ThreadContext context,
                              java.lang.String string,
                              IRubyObject arg)
Specified by:
callMethod in interface IRubyObject
Returns:

callMethod

public IRubyObject callMethod(ThreadContext context,
                              java.lang.String method,
                              IRubyObject[] rubyArgs)
Specified by:
callMethod in interface IRubyObject
Returns:

callMethod

public IRubyObject callMethod(ThreadContext context,
                              java.lang.String method,
                              IRubyObject[] rubyArgs,
                              Block block)
Specified by:
callMethod in interface IRubyObject
Returns:

callSuper

public IRubyObject callSuper(ThreadContext context,
                             IRubyObject[] args,
                             Block block)
Specified by:
callSuper in interface IRubyObject
Returns:

checkArrayType

public IRubyObject checkArrayType()
Specified by:
checkArrayType in interface IRubyObject
Returns:

checkStringType

public IRubyObject checkStringType()
Specified by:
checkStringType in interface IRubyObject
Returns:

compilerCallMethod

public IRubyObject compilerCallMethod(ThreadContext context,
                                      java.lang.String name,
                                      IRubyObject[] args,
                                      IRubyObject caller,
                                      CallType callType,
                                      Block block)
Specified by:
compilerCallMethod in interface IRubyObject
Returns:

compilerCallMethodWithIndex

public IRubyObject compilerCallMethodWithIndex(ThreadContext context,
                                               int methodIndex,
                                               java.lang.String name,
                                               IRubyObject[] args,
                                               IRubyObject caller,
                                               CallType callType,
                                               Block block)
Specified by:
compilerCallMethodWithIndex in interface IRubyObject
Returns:

convertToArray

public RubyArray convertToArray()
Description copied from interface: IRubyObject
Methods which perform to_xxx if the object has such a method

Specified by:
convertToArray in interface IRubyObject
Returns:

convertToFloat

public RubyFloat convertToFloat()
Specified by:
convertToFloat in interface IRubyObject
Returns:

convertToHash

public RubyHash convertToHash()
Specified by:
convertToHash in interface IRubyObject
Returns:

convertToInteger

public RubyInteger convertToInteger()
Specified by:
convertToInteger in interface IRubyObject
Returns:

convertToString

public RubyString convertToString()
Specified by:
convertToString in interface IRubyObject
Returns:

convertToType

public IRubyObject convertToType(RubyClass targetType,
                                 int convertMethodIndex,
                                 java.lang.String convertMethod,
                                 boolean raiseOnError)
Description copied from interface: IRubyObject
Converts this object to type 'targetType' using 'convertMethod' method (MRI: convert_type).

Specified by:
convertToType in interface IRubyObject
Parameters:
targetType - is the type we are trying to convert to
convertMethod - is the method to be called to try and convert to targeType
raiseOnError - will throw an Error if conversion does not work
Returns:
the converted value

convertToType

public IRubyObject convertToType(RubyClass targetType,
                                 int convertMethodIndex,
                                 java.lang.String convertMethod,
                                 boolean raiseOnMissingMethod,
                                 boolean raiseOnWrongTypeResult,
                                 boolean allowNilThrough)
Specified by:
convertToType in interface IRubyObject
Returns:

convertToTypeWithCheck

public IRubyObject convertToTypeWithCheck(RubyClass targetType,
                                          int convertMethodIndex,
                                          java.lang.String convertMethod)
Description copied from interface: IRubyObject
Higher level conversion utility similiar to convertToType but it can throw an additional TypeError during conversion (MRI: rb_check_convert_type).

Specified by:
convertToTypeWithCheck in interface IRubyObject
Parameters:
targetType - is the type we are trying to convert to
convertMethod - is the method to be called to try and convert to targeType
Returns:
the converted value

dataGetStruct

public java.lang.Object dataGetStruct()
Description copied from interface: IRubyObject
Our version of Data_Get_Struct. Returns a wrapped data value if there is one, otherwise returns null.

Specified by:
dataGetStruct in interface IRubyObject
Returns:
the object wrapped.

dataWrapStruct

public void dataWrapStruct(java.lang.Object obj)
Description copied from interface: IRubyObject
Our version of Data_Wrap_Struct. This method will just set a private pointer to the object provided. This pointer is transient and will not be accessible from Ruby.

Specified by:
dataWrapStruct in interface IRubyObject
Parameters:
obj - the object to wrap

dup

public IRubyObject dup()
Description copied from interface: IRubyObject
RubyMethod dup.

Specified by:
dup in interface IRubyObject
Returns:

eql

public boolean eql(IRubyObject other)
Specified by:
eql in interface IRubyObject

eqlInternal

public boolean eqlInternal(ThreadContext context,
                           IRubyObject other)
Specified by:
eqlInternal in interface IRubyObject

equal

public IRubyObject equal(IRubyObject other)
Specified by:
equal in interface IRubyObject

equalInternal

public IRubyObject equalInternal(ThreadContext context,
                                 IRubyObject other)
Specified by:
equalInternal in interface IRubyObject

evalSimple

public IRubyObject evalSimple(ThreadContext context,
                              IRubyObject evalString,
                              java.lang.String file)
Description copied from interface: IRubyObject
Evaluate the given string.

Specified by:
evalSimple in interface IRubyObject
Parameters:
context - TODO
evalString - The string containing the text to be evaluated
file - The filename to use when reporting errors during the evaluation
Returns:
An IRubyObject result from the evaluation

evalWithBinding

public IRubyObject evalWithBinding(ThreadContext context,
                                   IRubyObject evalString,
                                   IRubyObject binding,
                                   java.lang.String file,
                                   int lineNumber)
Description copied from interface: IRubyObject
Evaluate the given string under the specified binding object. If the binding is not a Proc or Binding object (RubyProc or RubyBinding) throw an appropriate type error.

Specified by:
evalWithBinding in interface IRubyObject
Parameters:
context - TODO
evalString - The string containing the text to be evaluated
binding - The binding object under which to perform the evaluation
file - The filename to use when reporting errors during the evaluation
lineNumber - is the line number to pretend we are starting from
Returns:
An IRubyObject result from the evaluation

getInstanceVariable

public IRubyObject getInstanceVariable(java.lang.String string)
Description copied from interface: IRubyObject
RubyMethod getInstanceVar.

Specified by:
getInstanceVariable in interface IRubyObject
Returns:
RubyObject

getInstanceVariables

public java.util.Map getInstanceVariables()
Specified by:
getInstanceVariables in interface IRubyObject
Returns:

getInstanceVariablesSnapshot

public java.util.Map getInstanceVariablesSnapshot()
Specified by:
getInstanceVariablesSnapshot in interface IRubyObject
Returns:

getJavaClass

public java.lang.Class getJavaClass()
Description copied from interface: IRubyObject
RubyMethod getJavaClass.

Specified by:
getJavaClass in interface IRubyObject
Returns:
Class

getMetaClass

public RubyClass getMetaClass()
Description copied from interface: IRubyObject
RubyMethod getRubyClass.

Specified by:
getMetaClass in interface IRubyObject
Returns:

getNativeTypeIndex

public int getNativeTypeIndex()
Description copied from interface: IRubyObject
Return the ClassIndex value for the native type this object was constructed from. Particularly useful for determining marshalling format. All instances of subclasses of Hash, for example are of Java type RubyHash, and so should utilize RubyHash marshalling logic in addition to user-defined class marshalling logic.

Specified by:
getNativeTypeIndex in interface IRubyObject
Returns:
the ClassIndex of the native type this object was constructed from

getRuntime

public Ruby getRuntime()
Description copied from interface: IRubyObject
RubyMethod getRuntime.

Specified by:
getRuntime in interface IRubyObject
Returns:

getSingletonClass

public RubyClass getSingletonClass()
Description copied from interface: IRubyObject
RubyMethod getSingletonClass.

Specified by:
getSingletonClass in interface IRubyObject
Returns:
RubyClass

getType

public RubyClass getType()
Description copied from interface: IRubyObject
RubyMethod getType.

Specified by:
getType in interface IRubyObject
Returns:
RubyClass

id

public RubyFixnum id()
Specified by:
id in interface IRubyObject
Returns:

infectBy

public IRubyObject infectBy(IRubyObject obj)
Description copied from interface: IRubyObject
Infect this object using the taint of another object

Specified by:
infectBy in interface IRubyObject
Returns:

inspect

public IRubyObject inspect()
Description copied from interface: IRubyObject
RubyMethod inspect.

Specified by:
inspect in interface IRubyObject
Returns:
String

instanceVariableNames

public java.util.Iterator instanceVariableNames()
Specified by:
instanceVariableNames in interface IRubyObject
Returns:

isFrozen

public boolean isFrozen()
Description copied from interface: IRubyObject
RubyMethod isFrozen.

Specified by:
isFrozen in interface IRubyObject
Returns:
boolean

isImmediate

public boolean isImmediate()
Specified by:
isImmediate in interface IRubyObject
Returns:

isKindOf

public boolean isKindOf(RubyModule rubyClass)
Description copied from interface: IRubyObject
RubyMethod isKindOf.

Specified by:
isKindOf in interface IRubyObject
Returns:
boolean

isNil

public boolean isNil()
Description copied from interface: IRubyObject
RubyMethod isNil.

Specified by:
isNil in interface IRubyObject
Returns:
boolean

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface IRubyObject
Returns:

isTaint

public boolean isTaint()
Description copied from interface: IRubyObject
RubyMethod isTaint.

Specified by:
isTaint in interface IRubyObject
Returns:
boolean

isTrue

public boolean isTrue()
Specified by:
isTrue in interface IRubyObject
Returns:

rbClone

public IRubyObject rbClone(Block unusedBlock)
Description copied from interface: IRubyObject
RubyMethod rbClone.

Specified by:
rbClone in interface IRubyObject
Returns:
IRubyObject

removeFinalizers

public void removeFinalizers()
Specified by:
removeFinalizers in interface IRubyObject

respondsTo

public boolean respondsTo(java.lang.String string)
Description copied from interface: IRubyObject
RubyMethod respondsTo.

Specified by:
respondsTo in interface IRubyObject
Returns:
boolean

safeGetInstanceVariables

public java.util.Map safeGetInstanceVariables()
Description copied from interface: IRubyObject
Gets a copy of the instance variables for this object, if any exist. Returns null if this object has no instance variables. "safe" in that it doesn't cause the instance var map to be created.

Specified by:
safeGetInstanceVariables in interface IRubyObject
Returns:
A snapshot of the instance vars, or null if none.

safeHasInstanceVariables

public boolean safeHasInstanceVariables()
Description copied from interface: IRubyObject
Returns true if the object has any instance variables, false otherwise. "safe" in that it doesn't cause the instance var map to be created.

Specified by:
safeHasInstanceVariables in interface IRubyObject
Returns:
true if the object has instance variables, false otherwise.

setFrozen

public void setFrozen(boolean b)
Description copied from interface: IRubyObject
RubyMethod setFrozen.

Specified by:
setFrozen in interface IRubyObject

setInstanceVariable

public IRubyObject setInstanceVariable(java.lang.String string,
                                       IRubyObject rubyObject)
Description copied from interface: IRubyObject
RubyMethod setInstanceVar.

Specified by:
setInstanceVariable in interface IRubyObject
Returns:
RubyObject

setInstanceVariables

public void setInstanceVariables(java.util.Map instanceVariables)
Specified by:
setInstanceVariables in interface IRubyObject

setMetaClass

public void setMetaClass(RubyClass metaClass)
Specified by:
setMetaClass in interface IRubyObject

setTaint

public void setTaint(boolean b)
Description copied from interface: IRubyObject
RubyMethod setTaint.

Specified by:
setTaint in interface IRubyObject


Copyright © 2002-2007 JRuby Team. All Rights Reserved.