org.jruby
Class MetaClass

java.lang.Object
  extended by org.jruby.RubyBasicObject
      extended by org.jruby.RubyObject
          extended by org.jruby.RubyModule
              extended by org.jruby.RubyClass
                  extended by org.jruby.MetaClass
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<IRubyObject>, InstanceVariables, InternalVariables, IRubyObject, CoreObjectType

public final class MetaClass
extends RubyClass

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jruby.RubyClass
RubyClass.SpecificArityNew, RubyClass.VariableAccessor
 
Nested classes/interfaces inherited from class org.jruby.RubyModule
RubyModule.Generation, RubyModule.KindOf, RubyModule.MethodClumper, RubyModule.ModuleKernelMethods
 
Nested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.ObjectMethods
 
Nested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.BasicObjectMethods, RubyBasicObject.Finalizer
 
Field Summary
 
Fields inherited from class org.jruby.RubyClass
CLASS_ALLOCATOR, CS_IDX_INITIALIZE, CS_NAMES, DEFAULT_OBJECT_MARSHAL, marshal, runtime
 
Fields inherited from class org.jruby.RubyModule
classId, ERR_FROZEN_CONST_TYPE, ERR_FROZEN_CVAR_TYPE, ERR_INSECURE_SET_CLASS_VAR, ERR_INSECURE_SET_CONSTANT, generation, id, includingHierarchies, index, kindOf, parent, SCOPE_CAPTURING_METHODS, superClass
 
Fields inherited from class org.jruby.RubyObject
OBJECT_ALLOCATOR
 
Fields inherited from class org.jruby.RubyBasicObject
ALL_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, metaClass, NEVER, NIL_F, TAINTED_F, UNDEF, UNTRUSTED_F, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F
 
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY
 
Constructor Summary
MetaClass(Ruby runtime)
          NEWOBJ (in RubyObject#getSingletonClassClone())
MetaClass(Ruby runtime, RubyClass superClass)
          rb_class_boot (for MetaClasses) (in makeMetaClass(RubyClass))
 
Method Summary
 IRubyObject allocate()
           
 IRubyObject getAttached()
           
 RubyClass getRealClass()
          If an object uses an anonymous class 'class << obj', then this grabs the original metaclass and not the one that get injected as a result of 'class << obj'.
 boolean isSingleton()
           
 void setAttached(IRubyObject attached)
           
 
Methods inherited from class org.jruby.RubyClass
addSubclass, checkInheritable, createBootstrapClass, createClassClass, finvoke, finvoke, finvoke, finvoke, finvoke, finvoke, finvoke, finvoke, finvoke, finvoke, getAllocator, getBaseCallSites, getClassRuntime, getExtraCallSites, getMarshal, getNativeTypeIndex, getVariableAccessorForRead, getVariableAccessorForWrite, getVariableAccessorsForRead, getVariableAccessorsForWrite, getVariableTableCopy, getVariableTableSize, inherit, inherited, initialize_copy, initialize, initialize, initialize19, initialize19, invalidateCacheDescendants, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invoke, invokeInherited, isClass, isModule, makeMetaClass, marshal, marshalTo, newClass, newClass, newClass, newClass, newInstance, notVisibleAndNotMethodMissing, removeSubclass, replaceSubclass, setAllocator, setClassAllocator, setMarshal, setModuleSuperClass, subclasses, superclass, superclass19, unmarshal, unmarshalFrom
 
Methods inherited from class org.jruby.RubyModule
addClassProvider, addIncludingHierarchy, addMethod, addMethodAtBootTimeOnly, addMethodInternal, addModuleFunction, addReadAttribute, addReadWriteAttribute, addWriteAttribute, alias_method, ancestors, ancestors, append_features, attr_1_9, attr_accessor, attr_accessor, attr_reader, attr_reader, attr_writer, attr, class_variable_defined_p, class_variable_get, class_variable_set, class_variables, cloneMethods, const_defined_p, const_get, const_missing, const_set, constants, constantTableContains, constantTableFastContains, constantTableFastFetch, constantTableFastStore, constantTableFetch, constantTableRemove, constantTableStore, createModuleClass, define_method, define_method, define_method, defineAlias, defineAliases, defineAnnotatedConstant, defineAnnotatedConstants, defineAnnotatedMethod, defineAnnotatedMethod, defineAnnotatedMethod, defineAnnotatedMethod, defineAnnotatedMethods, defineAnnotatedMethodsIndividually, defineClassUnder, defineConstant, defineFastMethod, defineFastMethod, defineFastModuleFunction, defineFastPrivateMethod, defineFastProtectedMethod, defineFastPublicModuleFunction, defineMethod, defineModuleFunction, defineModuleUnder, defineOrGetClassUnder, defineOrGetModuleUnder, definePrivateMethod, definePublicModuleFunction, deleteClassVariable, deleteConstant, ensureClassVariablesSettable, ensureConstantsSettable, equals, executeUnder, exportMethod, extend_object, extended, fastFetchClassVariable, fastFetchConstant, fastGetClass, fastGetClassVar, fastGetConstant, fastGetConstantAt, fastGetConstantFrom, fastGetConstantFromConstMissing, fastGetConstantFromNoConstMissing, fastHasClassVariable, fastHasConstant, fastIsClassVarDefined, fastIsConstantDefined, fastSetClassVar, fastSetConstant, fastStoreClassVariable, fastStoreConstant, fetchClassVariable, fetchConstant, findImplementer, freeze, getAncestorList, getBaseName, getCacheToken, getClass, getClassVar, getClassVariableNameList, getClassVariables, getClassVariablesForRead, getConstant, getConstantAt, getConstantFrom, getConstantInner, getConstantMap, getConstantMapForWrite, getConstantNames, getConstantNoConstMissing, getMethods, getName, getNonIncludedClass, getParent, getStoredConstantList, getStoredConstantNameList, getSuperClass, hasClassVariable, hasConstant, hash, hashCode, hasInternalModuleVariable, hasModuleInHierarchy, include_p, include, included_modules, included, includeModule, initialize, instance_method, instance_methods, instance_methods19, invalidateConstantCache, isClassVarDefined, isConstantDefined, isIncluded, isInstance, isKindOfModule, isMethodBound, isSame, marshalTo, method_added, method_defined_p, method_removed, method_undefined, module_eval, module_eval, module_eval, module_eval, module_eval, module_function, name, name19, needsImplementer, nesting, newIncludeClass, newMethod, newModule, newModule, op_cmp, op_eqq, op_equal, op_ge, op_gt, op_le, op_lt, populateInstanceMethodNames, private_class_method, private_instance_methods, private_instance_methods19, private_method_defined, protected_instance_methods, protected_instance_methods19, protected_method_defined, public_class_method, public_instance_methods, public_instance_methods19, public_method_defined, rbPrivate, rbProtected, rbPublic, remove_class_variable, remove_const, remove_method, removeClassProvider, removeCvar, removeMethod, resolveUndefConstant, retrieveMethod, searchInternalModuleVariable, searchMethod, searchMethodInner, searchWithCache, setBaseName, setClassVar, setConstant, setInternalModuleVariable, setMethodVisibility, setParent, setSuperClass, storeClassVariable, storeConstant, syncConstants, to_s, undef_method, undef, undefineMethod, validateClassVariable, validateConstant
 
Methods inherited from class org.jruby.RubyObject
as, attachToObjectSpace, callInit, checkFrozen, convertToType, createObjectClass, display, dup, eql_p, eqlInternal, equal_p, equalInternal, evalUnder, evalUnder, extend, frozen_p, id_deprecated, id, initialize, inspect, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval, instance_exec, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, kind_of_p, method, methods, nil_p, op_match, private_methods, protected_methods, public_methods, puts, rbClone, remove_instance_variable, respond_to_p, respond_to_p, send, send, send, send, send, singleton_methods, singleton_methods19, singletonMethods, specificEval, specificEval, specificEval, specificEval, specificEval, taint, tainted_p, to_a, to_java, toString, trust, type_deprecated, type, untaint, untrust, untrusted_p, validateInstanceVariable
 
Methods inherited from class org.jruby.RubyBasicObject
addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkStringType, compareTo, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, createBasicObjectClass, dataGetStruct, dataWrapStruct, ensureInstanceVariablesSettable, eql, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, getFlag, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getJavaClass, getMetaClass, getRuntime, getSingletonClass, getSingletonClassClone, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hasInstanceVariable, hasInternalVariable, hasVariables, infectBy, isFalse, isFrozen, isImmediate, isNil, isTaint, isTrue, isUntrusted, op_not_equal, op_not, removeFinalizers, removeInstanceVariable, removeInternalVariable, respondsTo, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setTaint, setUntrusted, setVariable, syncVariables, taint, testFrozen, testFrozen, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableGetSize, variableTableRemove, variableTableStore, variableTableSync
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetaClass

public MetaClass(Ruby runtime)
NEWOBJ (in RubyObject#getSingletonClassClone())


MetaClass

public MetaClass(Ruby runtime,
                 RubyClass superClass)
rb_class_boot (for MetaClasses) (in makeMetaClass(RubyClass))

Method Detail

isSingleton

public boolean isSingleton()
Overrides:
isSingleton in class RubyClass

getRealClass

public RubyClass getRealClass()
If an object uses an anonymous class 'class << obj', then this grabs the original metaclass and not the one that get injected as a result of 'class << obj'.

Overrides:
getRealClass in class RubyClass

allocate

public final IRubyObject allocate()
Overrides:
allocate in class RubyClass

getAttached

public IRubyObject getAttached()

setAttached

public void setAttached(IRubyObject attached)


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