/** used by CLASS_ALLOCATOR (any Class' class will be a Class!) * also used to bootstrap Object class */ protected RubyClass(Ruby runtime) { super(runtime, runtime.getClassClass()); this.runtime = runtime; this.realClass = this; this.variableTableManager = new VariableTableManager(this); index = ClassIndex.CLASS; }
/** used by CLASS_ALLOCATOR (any Class' class will be a Class!) * also used to bootstrap Object class */ protected RubyClass(Ruby runtime) { super(runtime, runtime.getClassClass()); this.runtime = runtime; this.realClass = this; this.variableTableManager = new VariableTableManager(this); index = ClassIndex.CLASS; }
/** separate path for MetaClass and IncludedModuleWrapper construction * (rb_class_boot version for MetaClasses) * no marshal, allocator initialization and addSubclass(this) here! */ protected RubyClass(Ruby runtime, RubyClass superClass, boolean objectSpace) { super(runtime, runtime.getClassClass(), objectSpace); this.runtime = runtime; // Since this path is for included wrappers and singletons, use parent // class's realClass and varTableMgr. If the latter is null, create a // dummy, since we won't be using it anyway (we're above BasicObject // so variable requests won't reach us). if (superClass == null) { this.realClass = null; this.variableTableManager = new VariableTableManager(this); } else { if ((this.realClass = superClass.realClass) != null) { this.variableTableManager = realClass.variableTableManager; } else { this.variableTableManager = new VariableTableManager(this); } } setSuperClass(superClass); // this is the only case it might be null here (in MetaClass construction) }
/** separate path for MetaClass and IncludedModuleWrapper construction * (rb_class_boot version for MetaClasses) * no marshal, allocator initialization and addSubclass(this) here! */ protected RubyClass(Ruby runtime, RubyClass superClass, boolean objectSpace) { super(runtime, runtime.getClassClass(), objectSpace); this.runtime = runtime; // Since this path is for included wrappers and singletons, use parent // class's realClass and varTableMgr. If the latter is null, create a // dummy, since we won't be using it anyway (we're above BasicObject // so variable requests won't reach us). if (superClass == null) { this.realClass = null; this.variableTableManager = new VariableTableManager(this); } else { if ((this.realClass = superClass.realClass) != null) { this.variableTableManager = realClass.variableTableManager; } else { this.variableTableManager = new VariableTableManager(this); } } setSuperClass(superClass); // this is the only case it might be null here (in MetaClass construction) }
/** separate path for MetaClass and IncludedModuleWrapper construction * (rb_class_boot version for MetaClasses) * no marshal, allocator initialization and addSubclass(this) here! */ protected RubyClass(Ruby runtime, RubyClass superClass, boolean objectSpace) { super(runtime, runtime.getClassClass(), objectSpace); this.runtime = runtime; // Since this path is for included wrappers and singletons, use parent // class's realClass and varTableMgr. If the latter is null, create a // dummy, since we won't be using it anyway (we're above BasicObject // so variable requests won't reach us). if (superClass == null) { this.realClass = null; this.variableTableManager = new VariableTableManager(this); } else { this.realClass = superClass.realClass; if (realClass != null) { this.variableTableManager = realClass.variableTableManager; } else { this.variableTableManager = new VariableTableManager(this); } } setSuperClass(superClass); // this is the only case it might be null here (in MetaClass construction) }
/** separate path for MetaClass and IncludedModuleWrapper construction * (rb_class_boot version for MetaClasses) * no marshal, allocator initialization and addSubclass(this) here! */ protected RubyClass(Ruby runtime, RubyClass superClass, boolean objectSpace) { super(runtime, runtime.getClassClass(), objectSpace); this.runtime = runtime; // Since this path is for included wrappers and singletons, use parent // class's realClass and varTableMgr. If the latter is null, create a // dummy, since we won't be using it anyway (we're above BasicObject // so variable requests won't reach us). if (superClass == null) { this.realClass = null; this.variableTableManager = new VariableTableManager(this); } else { this.realClass = superClass.realClass; if (realClass != null) { this.variableTableManager = realClass.variableTableManager; } else { this.variableTableManager = new VariableTableManager(this); } } setSuperClass(superClass); // this is the only case it might be null here (in MetaClass construction) }
/** used by CLASS_ALLOCATOR (any Class' class will be a Class!) * also used to bootstrap Object class */ protected RubyClass(Ruby runtime) { super(runtime, runtime.getClassClass()); this.runtime = runtime; this.realClass = this; this.variableTableManager = new VariableTableManager(this); setClassIndex(ClassIndex.CLASS); }
/** used by CLASS_ALLOCATOR (any Class' class will be a Class!) * also used to bootstrap Object class */ protected RubyClass(Ruby runtime) { super(runtime, runtime.getClassClass()); this.runtime = runtime; this.realClass = this; this.variableTableManager = new VariableTableManager(this); setClassIndex(ClassIndex.CLASS); }