org.jruby
Class MetaClass

java.lang.Object
  extended byorg.jruby.RubyObject
      extended byorg.jruby.RubyModule
          extended byorg.jruby.RubyClass
              extended byorg.jruby.MetaClass
All Implemented Interfaces:
java.lang.Cloneable, IRubyObject

public class MetaClass
extends RubyClass


Nested Class Summary
 
Nested classes inherited from class org.jruby.RubyObject
RubyObject.Finalizer
 
Field Summary
 
Fields inherited from class org.jruby.RubyClass
EQQ_SWITCHVALUE
 
Fields inherited from class org.jruby.RubyModule
cref, id, index
 
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
MetaClass(Ruby runtime, RubyClass superClass, ObjectAllocator allocator, SinglyLinkedList parentCRef)
           
 
Method Summary
 IRubyObject allocateObject()
           
 IRubyObject getAttachedObject()
           
 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 methodAdded(RubySymbol symbol)
           
protected  RubyClass subclass()
          Create a new subclass of this class.
 
Methods inherited from class org.jruby.RubyClass
allocate, callMethod, cloneClass, createBootstrapMetaClass, createClassClass, doClone, getAllocator, getMarshal, getNativeTypeIndex, getRuntime, inherited, inherited, inheritedBy, initialize_copy, isClass, isModule, marshal, marshalTo, newClass, newClass, newClass, newClassClass, newInstance, newSubClass, newSubClass, setMarshal, superclass, unmarshal, unmarshalFrom
 
Methods inherited from class org.jruby.RubyModule
addClassProvider, addMethod, addModuleFunction, alias_method, ancestors, append_features, attr_accessor, attr_reader, attr_writer, attr, class_variable_get, class_variable_set, class_variables, cloneMethods, const_defined, const_get, const_missing, const_set, constants, createModuleClass, define_method, defineAlias, defineClassUnder, defineConstant, defineFastMethod, defineFastMethod, defineFastModuleFunction, defineFastPrivateMethod, defineFastProtectedMethod, defineFastPublicModuleFunction, defineMethod, defineModuleFunction, defineModuleUnder, defineOrGetClassUnder, definePrivateMethod, definePublicModuleFunction, executeUnder, exportMethod, extend_object, extended, findImplementer, getAncestorList, getBaseName, getClass, getClassVar, getConstant, getConstantAt, getConstantFrom, getCRef, getMethods, getName, getNonIncludedClass, getParent, getSuperClass, hash, hashCode, hasModuleInHierarchy, include_p, include, included_modules, included, includeModule, initialize, instance_method, instance_methods, isClassVarDefined, isIncluded, isKindOfModule, isMethodBound, isSame, marshalTo, method_added, method_defined, method_removed, method_undefined, module_eval, module_function, name, nesting, newIncludeClass, newMethod, newModule, newModule, newModule, newModule, op_cmp, op_eqq, op_ge, op_gt, op_le, op_lt, private_class_method, private_instance_methods, private_method_defined, protected_instance_methods, protected_method_defined, public_class_method, public_instance_methods, public_method_defined, putMethod, rbPrivate, rbProtected, rbPublic, remove_class_variable, remove_const, remove_method, removeCachedMethod, removeClassProvider, removeCvar, removeMethod, retrieveMethod, searchMethod, setBaseName, setClassVar, setConstant, setMethodVisibility, setParent, setSuperClass, to_s, undef_method, undef, undefineMethod
 
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, callMethodMissingIfNecessary, callSuper, checkArrayType, checkFrozen, checkStringType, compilerCallMethod, compilerCallMethodWithIndex, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToString, convertToType, convertToType, convertToType, convertToTypeWithCheck, createObjectClass, dataGetStruct, dataWrapStruct, display, dup, eql, eqlInternal, equal, equalInternal, equals, evalSimple, evalUnder, evalWithBinding, extend, freeze, frozen, getInstanceVariable, getInstanceVariables, getInstanceVariablesSnapshot, getJavaClass, getMetaClass, getSingletonClass, getSingletonClassClone, getType, id_deprecated, id, infectBy, inherited, initCopy, inspect, instance_eval, instance_exec, instance_of, instance_variable_get, instance_variable_set, instance_variables, instanceVariableNames, isFalse, isFrozen, isImmediate, isKindOf, isNil, isTaint, isTrue, kind_of, makeMetaClass, match, method, methods, nil_p, obj_equal, private_methods, protected_methods, public_methods, puts, rbClone, remove_instance_variable, removeFinalizers, removeInstanceVariable, respond_to, respondsTo, safeGetInstanceVariables, safeHasInstanceVariables, send, setFrozen, setInstanceVariable, setInstanceVariable, setInstanceVariables, setMetaClass, setTaint, singleton_methods, specificEval, taint, tainted, testFrozen, toString, trueFalseNil, trueFalseNil, type_deprecated, type, untaint
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetaClass

public MetaClass(Ruby runtime,
                 RubyClass superClass,
                 ObjectAllocator allocator,
                 SinglyLinkedList parentCRef)
Method Detail

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface IRubyObject
Overrides:
isSingleton in class RubyClass

subclass

protected RubyClass subclass()
Description copied from class: RubyClass
Create a new subclass of this class.

Overrides:
subclass in class RubyClass
Returns:
the new sublass

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

methodAdded

public void methodAdded(RubySymbol symbol)

getAttachedObject

public IRubyObject getAttachedObject()

allocateObject

public IRubyObject allocateObject()


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