|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.RubyBasicObject
org.jruby.RubyObject
org.jruby.RubyNil
public class RubyNil
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jruby.RubyObject |
---|
RubyObject.ObjectMethods |
Nested classes/interfaces inherited from class org.jruby.RubyBasicObject |
---|
RubyBasicObject.BasicObjectMethods, RubyBasicObject.Finalizer, RubyBasicObject.VariableTableEntry |
Field Summary | |
---|---|
static ObjectAllocator |
NIL_ALLOCATOR
|
Fields inherited from class org.jruby.RubyObject |
---|
OBJECT_ALLOCATOR |
Fields inherited from class org.jruby.RubyBasicObject |
---|
ALL_F, dataStruct, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, metaClass, NEVER, NIL_F, TAINTED_F, UNDEF, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, VARIABLE_TABLE_DEFAULT_CAPACITY, VARIABLE_TABLE_EMPTY_TABLE, VARIABLE_TABLE_LOAD_FACTOR, VARIABLE_TABLE_MAXIMUM_CAPACITY, variableTable, variableTableSize, variableTableThreshold |
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(ThreadContext context)
rb_obj_freeze call-seq: obj.freeze => obj Prevents further modifications to obj. |
java.lang.Class<?> |
getJavaClass()
Will return the Java interface that most closely can represent this object, when working through JAva integration translations. |
int |
getNativeTypeIndex()
This is overridden in the other concrete Java builtins to provide a fast way to determine what type they are. |
RubyClass |
getSingletonClass()
rb_singleton_class Note: this method is specialized for RubyFixnum, RubySymbol, RubyNil and RubyBoolean Will either return the existing singleton class for this object, or create a new one and return that. |
RubyFixnum |
id()
rb_obj_id Return the internal id of an object. |
static RubyString |
inspect(IRubyObject recv)
nil_inspect |
boolean |
isImmediate()
Is object immediate (def: Fixnum, Symbol, true, false, nil?). |
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 |
IRubyObject |
taint(ThreadContext context)
rb_obj_taint call-seq: obj.taint -> obj Marks obj as tainted---if the $SAFE level is
set appropriately, many method calls which might alter the running
programs environment will refuse to accept tainted strings. |
static RubyArray |
to_a(IRubyObject recv)
nil_to_a |
static IRubyObject |
to_c(ThreadContext context,
IRubyObject recv)
nilclass_to_c |
static RubyFloat |
to_f(IRubyObject recv)
nil_to_f |
static RubyFixnum |
to_i(IRubyObject recv)
nil_to_i |
static IRubyObject |
to_r(ThreadContext context,
IRubyObject recv)
nilclass_to_r |
static RubyString |
to_s(IRubyObject recv)
nil_to_s |
static RubyClass |
type(IRubyObject recv)
nil_type |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ObjectAllocator NIL_ALLOCATOR
Constructor Detail |
---|
public RubyNil(Ruby runtime)
Method Detail |
---|
public static RubyClass createNilClass(Ruby runtime)
public int getNativeTypeIndex()
RubyObject
getNativeTypeIndex
in interface CoreObjectType
getNativeTypeIndex
in class RubyObject
org.jruby.runtime.ClassInde
public boolean isImmediate()
RubyBasicObject
isImmediate
in interface IRubyObject
isImmediate
in class RubyBasicObject
public RubyClass getSingletonClass()
RubyBasicObject
getSingletonClass
in interface IRubyObject
getSingletonClass
in class RubyBasicObject
public java.lang.Class<?> getJavaClass()
RubyBasicObject
getJavaClass
in interface IRubyObject
getJavaClass
in class RubyBasicObject
public static RubyFixnum to_i(IRubyObject recv)
public static RubyFloat to_f(IRubyObject recv)
public static RubyString to_s(IRubyObject recv)
public static RubyArray to_a(IRubyObject recv)
public static RubyString inspect(IRubyObject recv)
public static RubyClass type(IRubyObject recv)
public static RubyBoolean op_and(IRubyObject recv, IRubyObject obj)
public static RubyBoolean op_or(IRubyObject recv, IRubyObject obj)
public static RubyBoolean op_xor(IRubyObject recv, IRubyObject obj)
public IRubyObject nil_p()
public RubyFixnum id()
RubyObject
id
in interface IRubyObject
id
in class RubyObject
public IRubyObject taint(ThreadContext context)
RubyObject
$SAFE
level is
set appropriately, many method calls which might alter the running
programs environment will refuse to accept tainted strings.
taint
in class RubyObject
public IRubyObject freeze(ThreadContext context)
RubyObject
TypeError
will be raised if modification is attempted.
There is no way to unfreeze a frozen object. See also
Object#frozen?
.
a = [ "a", "b", "c" ]
a.freeze
a << "z"
produces:
prog.rb:3:in `<<': can't modify frozen array (TypeError)
from prog.rb:3
freeze
in class RubyObject
public static IRubyObject to_c(ThreadContext context, IRubyObject recv)
public static IRubyObject to_r(ThreadContext context, IRubyObject recv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |