org.jruby
Class RubyNil

java.lang.Object
  extended by org.jruby.RubyObject
      extended by org.jruby.RubyNil
All Implemented Interfaces:
java.lang.Cloneable, IRubyObject

public class RubyNil
extends RubyObject

Author:
jpetersen

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.Finalizer
 
Field Summary
static ObjectAllocator NIL_ALLOCATOR
           
 
Fields inherited from class org.jruby.RubyObject
instanceVariables, isTrue, metaClass, NEVER, OBJECT_ALLOCATOR
 
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY
 
Constructor Summary
RubyNil(Ruby runtime)
           
 
Method Summary
static RubyClass createNilClass(Ruby runtime)
           
 IRubyObject freeze()
          Freeze an object.
 int getNativeTypeIndex()
          This is overridden in the other concrete Java builtins to provide a fast way to determine what type they are.
 Ruby getRuntime()
          Getter for property ruby.
 RubyFixnum id()
          Return the internal id of an object.
static RubyFixnum id(IRubyObject recv)
           
static RubyString inspect(IRubyObject recv)
          nil_inspect
 boolean isImmediate()
           
 boolean isNil()
          RubyMethod isNil.
 IRubyObject nil_p()
           
static RubyBoolean op_and(IRubyObject recv, IRubyObject obj)
          nil_and
static RubyBoolean op_or(IRubyObject recv, IRubyObject obj)
          nil_or
static RubyBoolean op_xor(IRubyObject recv, IRubyObject obj)
          nil_xor
 boolean safeHasInstanceVariables()
          Returns true if the object has any instance variables, false otherwise.
 IRubyObject taint()
          rb_obj_taint
static RubyArray to_a(IRubyObject recv)
          nil_to_a
static RubyFloat to_f(IRubyObject recv)
          nil_to_f
static RubyFixnum to_i(IRubyObject recv)
          nil_to_i
static RubyString to_s(IRubyObject recv)
          nil_to_s
static RubyClass type(IRubyObject recv)
          nil_type
 
Methods inherited from class org.jruby.RubyObject
addFinalizer, anyToString, asString, asSymbol, attachToObjectSpace, callInit, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethodMissing, callMethodMissing, callSuper, checkArrayType, checkFrozen, checkStringType, compilerCallMethod, compilerCallMethodWithIndex, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToString, convertToType, convertToType, convertToType, convertToTypeWithCheck, createObjectClass, dataGetStruct, dataWrapStruct, display, doClone, dup, eql, eqlInternal, equal, equalInternal, equals, evalSimple, evalUnder, evalWithBinding, extend, frozen, getInstanceVariable, getInstanceVariables, getInstanceVariablesSnapshot, getJavaClass, getMetaClass, getSingletonClass, getSingletonClassClone, getType, hash, hashCode, id_deprecated, infectBy, inherited, initCopy, initialize_copy, initialize, inspect, instance_eval, instance_exec, instance_of, instance_variable_get, instance_variable_set, instance_variables, instanceVariableNames, isFalse, isFrozen, isKindOf, isSingleton, isTaint, isTrue, kind_of, makeMetaClass, match, method, methods, obj_equal, private_methods, protected_methods, public_methods, puts, rbClone, remove_instance_variable, removeFinalizers, removeInstanceVariable, respond_to, respondsTo, safeGetInstanceVariables, send, setFrozen, setInstanceVariable, setInstanceVariable, setInstanceVariables, setMetaClass, setTaint, singleton_methods, specificEval, tainted, testFrozen, to_s, toString, trueFalseNil, trueFalseNil, type_deprecated, type, untaint
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NIL_ALLOCATOR

public static ObjectAllocator NIL_ALLOCATOR
Constructor Detail

RubyNil

public RubyNil(Ruby runtime)
Method Detail

getRuntime

public Ruby getRuntime()
Description copied from class: RubyObject
Getter for property ruby.

Specified by:
getRuntime in interface IRubyObject
Overrides:
getRuntime in class RubyObject
Returns:
Value of property ruby.

createNilClass

public static RubyClass createNilClass(Ruby runtime)

getNativeTypeIndex

public int getNativeTypeIndex()
Description copied from class: RubyObject
This is overridden in the other concrete Java builtins to provide a fast way to determine what type they are.

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

isImmediate

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

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
Overrides:
safeHasInstanceVariables in class RubyObject
Returns:
true if the object has instance variables, false otherwise.

to_i

public static RubyFixnum to_i(IRubyObject recv)
nil_to_i


to_f

public static RubyFloat to_f(IRubyObject recv)
nil_to_f


to_s

public static RubyString to_s(IRubyObject recv)
nil_to_s


to_a

public static RubyArray to_a(IRubyObject recv)
nil_to_a


inspect

public static RubyString inspect(IRubyObject recv)
nil_inspect


type

public static RubyClass type(IRubyObject recv)
nil_type


op_and

public static RubyBoolean op_and(IRubyObject recv,
                                 IRubyObject obj)
nil_and


op_or

public static RubyBoolean op_or(IRubyObject recv,
                                IRubyObject obj)
nil_or


op_xor

public static RubyBoolean op_xor(IRubyObject recv,
                                 IRubyObject obj)
nil_xor


id

public static RubyFixnum id(IRubyObject recv)

isNil

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

Specified by:
isNil in interface IRubyObject
Overrides:
isNil in class RubyObject
Returns:
boolean

freeze

public IRubyObject freeze()
Description copied from class: RubyObject
Freeze an object. rb_obj_freeze

Overrides:
freeze in class RubyObject

nil_p

public IRubyObject nil_p()
Overrides:
nil_p in class RubyObject

taint

public IRubyObject taint()
Description copied from class: RubyObject
rb_obj_taint

Overrides:
taint in class RubyObject

id

public RubyFixnum id()
Description copied from class: RubyObject
Return the internal id of an object. CRuby function: rb_obj_id

Specified by:
id in interface IRubyObject
Overrides:
id in class RubyObject
Returns:


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