|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.RubyObject
org.jruby.RubyModule
org.jruby.RubyClass
public class RubyClass
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jruby.RubyModule |
---|
RubyModule.ConstantTableEntry, RubyModule.KindOf, RubyModule.MethodClumper, RubyModule.ModuleKernelMethods |
Nested classes/interfaces inherited from class org.jruby.RubyObject |
---|
RubyObject.Finalizer, RubyObject.ObjectMethods, RubyObject.VariableTableEntry |
Field Summary | |
---|---|
static ObjectAllocator |
CLASS_ALLOCATOR
|
protected static ObjectMarshal |
DEFAULT_OBJECT_MARSHAL
|
protected ObjectMarshal |
marshal
|
Fields inherited from class org.jruby.RubyObject |
---|
ALL_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, metaClass, metaClassName, NEVER, NIL_F, OBJECT_ALLOCATOR, 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 | |
---|---|
protected |
RubyClass(Ruby runtime)
used by CLASS_ALLOCATOR (any Class' class will be a Class!) also used to bootstrap Object class |
protected |
RubyClass(Ruby runtime,
RubyClass superClazz)
rb_class_boot (for plain Classes) also used to bootstrap Module and Class classes |
protected |
RubyClass(Ruby runtime,
RubyClass superClass,
boolean objectSpace)
separate path for MetaClass and IncludedModuleWrapper construction (rb_class_boot version for MetaClasses) no marshal, allocator initialization and addSubclass(this) here! |
Method Summary | |
---|---|
void |
addSubclass(RubyClass subclass)
|
IRubyObject |
allocate()
|
static void |
checkInheritable(IRubyObject superClass)
rb_check_inheritable |
static RubyClass |
createBootstrapClass(Ruby runtime,
java.lang.String name,
RubyClass superClass,
ObjectAllocator allocator)
boot_defclass Create an initial Object meta class before Module and Kernel dependencies have squirreled themselves together. |
static void |
createClassClass(Ruby runtime,
RubyClass classClass)
|
ObjectAllocator |
getAllocator()
|
Ruby |
getClassRuntime()
|
ObjectMarshal |
getMarshal()
|
int |
getNativeTypeIndex()
This is overridden in the other concrete Java builtins to provide a fast way to determine what type they are. |
RubyClass |
getRealClass()
|
void |
inherit(RubyClass superClazz)
rb_class_inherited (reversed semantics!) |
IRubyObject |
inherited(IRubyObject arg)
|
IRubyObject |
initialize_copy(IRubyObject original)
rb_class_init_copy |
IRubyObject |
initialize(IRubyObject[] args,
Block block)
rb_class_initialize |
IRubyObject |
invoke(ThreadContext context,
IRubyObject self,
int methodIndex,
java.lang.String name,
IRubyObject[] args,
CallType callType,
Block block)
|
IRubyObject |
invoke(ThreadContext context,
IRubyObject self,
java.lang.String name,
IRubyObject[] args,
CallType callType,
Block block)
|
IRubyObject |
invoke(ThreadContext context,
IRubyObject self,
java.lang.String name,
IRubyObject arg,
CallType callType,
Block block)
|
IRubyObject |
invokeInherited(ThreadContext context,
IRubyObject self,
IRubyObject subclass)
|
boolean |
isClass()
Specifically polymorphic method that are meant to be overridden by classes to specify that they are classes in an easy way. |
boolean |
isModule()
Specifically polymorphic method that are meant to be overridden by modules to specify that they are modules in an easy way. |
boolean |
isSingleton()
|
RubyClass |
makeMetaClass(RubyClass superClass)
rb_make_metaclass |
void |
marshal(java.lang.Object obj,
MarshalStream marshalStream)
|
static void |
marshalTo(RubyClass clazz,
MarshalStream output)
|
static RubyClass |
newClass(Ruby runtime,
RubyClass superClass)
rb_class_new |
static RubyClass |
newClass(Ruby runtime,
RubyClass superClass,
java.lang.String name,
ObjectAllocator allocator,
RubyModule parent,
boolean setParent)
rb_class_new/rb_define_class_id/rb_name_class/rb_set_class_path |
IRubyObject |
newInstance(ThreadContext context,
IRubyObject[] args,
Block block)
rb_class_new_instance |
void |
setAllocator(ObjectAllocator allocator)
|
void |
setMarshal(ObjectMarshal marshal)
|
java.util.Collection |
subclasses(boolean includeDescendants)
|
IRubyObject |
subclasses(IRubyObject[] args)
|
IRubyObject |
superclass()
Return the real super class of this class. |
java.lang.Object |
unmarshal(UnmarshalStream unmarshalStream)
|
static RubyClass |
unmarshalFrom(UnmarshalStream input)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ObjectAllocator CLASS_ALLOCATOR
protected ObjectMarshal marshal
protected static final ObjectMarshal DEFAULT_OBJECT_MARSHAL
Constructor Detail |
---|
protected RubyClass(Ruby runtime, RubyClass superClass, boolean objectSpace)
protected RubyClass(Ruby runtime)
protected RubyClass(Ruby runtime, RubyClass superClazz)
Method Detail |
---|
public static void createClassClass(Ruby runtime, RubyClass classClass)
public ObjectAllocator getAllocator()
public void setAllocator(ObjectAllocator allocator)
public IRubyObject allocate()
public int getNativeTypeIndex()
RubyObject
getNativeTypeIndex
in interface CoreObjectType
getNativeTypeIndex
in class RubyModule
org.jruby.runtime.ClassInde
public boolean isModule()
RubyObject
isModule
in interface IRubyObject
isModule
in class RubyModule
(someObject instanceof RubyModule)
instead.public boolean isClass()
RubyObject
isClass
in interface IRubyObject
isClass
in class RubyModule
(someObject instanceof RubyClass/MetaClass)
instead.public boolean isSingleton()
isSingleton
in class RubyModule
public static RubyClass createBootstrapClass(Ruby runtime, java.lang.String name, RubyClass superClass, ObjectAllocator allocator)
runtime
- we need it
public static RubyClass newClass(Ruby runtime, RubyClass superClass)
public static RubyClass newClass(Ruby runtime, RubyClass superClass, java.lang.String name, ObjectAllocator allocator, RubyModule parent, boolean setParent)
public RubyClass makeMetaClass(RubyClass superClass)
makeMetaClass
in class RubyObject
public IRubyObject invoke(ThreadContext context, IRubyObject self, int methodIndex, java.lang.String name, IRubyObject[] args, CallType callType, Block block)
public IRubyObject invoke(ThreadContext context, IRubyObject self, java.lang.String name, IRubyObject[] args, CallType callType, Block block)
public IRubyObject invoke(ThreadContext context, IRubyObject self, java.lang.String name, IRubyObject arg, CallType callType, Block block)
public IRubyObject invokeInherited(ThreadContext context, IRubyObject self, IRubyObject subclass)
public IRubyObject newInstance(ThreadContext context, IRubyObject[] args, Block block)
public IRubyObject initialize(IRubyObject[] args, Block block)
public IRubyObject initialize_copy(IRubyObject original)
initialize_copy
in class RubyModule
public IRubyObject subclasses(IRubyObject[] args)
public java.util.Collection subclasses(boolean includeDescendants)
public void addSubclass(RubyClass subclass)
public Ruby getClassRuntime()
public RubyClass getRealClass()
public IRubyObject inherited(IRubyObject arg)
public void inherit(RubyClass superClazz)
public IRubyObject superclass()
public static void checkInheritable(IRubyObject superClass)
public final ObjectMarshal getMarshal()
public final void setMarshal(ObjectMarshal marshal)
public final void marshal(java.lang.Object obj, MarshalStream marshalStream) throws java.io.IOException
java.io.IOException
public final java.lang.Object unmarshal(UnmarshalStream unmarshalStream) throws java.io.IOException
java.io.IOException
public static void marshalTo(RubyClass clazz, MarshalStream output) throws java.io.IOException
java.io.IOException
public static RubyClass unmarshalFrom(UnmarshalStream input) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |