Top Fields Constructors Methods
org.jruby

public Class IncludedModule

extends RubyClass
implements DelegatedModule
Class Inheritance
All Implemented Interfaces
org.jruby.DelegatedModule
Known Direct Subclasses
org.jruby.IncludedModuleWrapper
Imports
java.util.Map, org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject

Field Summary

Modifier and TypeField and Description
protected final RubyModule
origin

The module to which this include origins.

Inherited from org.jruby.RubyClass:
CLASS_ALLOCATORCS_IDX_INITIALIZEDEFAULT_OBJECT_MARSHALEMPTY_RUBYCLASS_SETmarshalruntime

Constructor Summary

AccessConstructor and Description
public
IncludedModule(Ruby runtime, RubyClass superClass, RubyModule origin)

Method Summary

Modifier and TypeMethod and Description
protected synchronized Map<String, IRubyObject>
protected Map<String, IRubyObject>
public String
getName(ThreadContext context)

Overrides org.jruby.RubyModule.getName.

Generate a fully-qualified class name or a #-style name for anonymous and singleton classes.

public RubyModule
public RubyModule
getOrigin()

Overrides org.jruby.RubyModule.getOrigin.

In an included or prepended module what is the ACTUAL module it represents?

public IRubyObject
id()

Overrides org.jruby.RubyBasicObject.id.

Implements org.jruby.runtime.builtin.IRubyObject.id.

We don't want to reveal ourselves to Ruby code, so origin this operation.

public boolean
isClass()

Overrides org.jruby.RubyClass.isClass.

Implements org.jruby.runtime.builtin.IRubyObject.isClass.

Specifically polymorphic method that are meant to be overridden by classes to specify that they are classes in an easy way.

public boolean
isImmediate()

Overrides org.jruby.RubyBasicObject.isImmediate.

Implements org.jruby.runtime.builtin.IRubyObject.isImmediate.

Is object immediate (def: Fixnum, Symbol, true, false, nil?).

public boolean
isModule()

Overrides org.jruby.RubyClass.isModule.

Implements org.jruby.runtime.builtin.IRubyObject.isModule.

Specifically polymorphic method that are meant to be overridden by modules to specify that they are modules in an easy way.

public void
setMetaClass(RubyClass
the meta class to set
newRubyClass
)

Overrides org.jruby.RubyBasicObject.setMetaClass.

Makes it possible to change the metaclass of an object.

Inherited from org.jruby.RubyClass:
addAllSubclassesaddClassAnnotationaddFieldAnnotationaddFieldSignatureaddInvalidatorsAndFlushaddMethodAnnotationaddMethodSignatureaddParameterAnnotationaddSubclassallocateallocateallocatorattached_objectbecomeSynchronizedcheckFuncallCallablecheckInheritablecheckInheritablecheckMethodBasicDefinitioncreateBootstrapClassfinishClassClassfinishCreateClassClassfinvokefinvokefinvokefinvokefinvokefinvokefinvokefinvokefinvokefinvokefinvokeCheckedfinvokeCheckedfinvokeCheckedfinvokeCheckedfinvokeWithRefinementsfinvokeWithRefinementsfinvokeWithRefinementsfinvokeWithRefinementsfinvokeWithRefinementsgetAllMethodSignaturesgetAllocatorgetBaseCallSitegetBaseCallSitesgetClassAnnotationsgetClassConfiggetClassRuntimegetExtraCallSitesgetFFIHandleAccessorFieldgetFFIHandleAccessorForReadgetFFIHandleAccessorForWritegetFieldAnnotationsgetFieldSignaturesgetIsReifiedExtendedJavaClassgetMarshalgetMethodAnnotationsgetMethodSignaturesgetNativeClassIndexgetObjectGroupAccessorFieldgetObjectGroupAccessorForReadgetObjectGroupAccessorForWritegetObjectIdAccessorFieldgetParameterAnnotationsgetPositionOrDefaultgetRealClassgetRealModulegetReifiedClassgetReifiedJavaClassgetReifiedRubyClassgetSubclassesForReadgetVariableAccessorForReadgetVariableAccessorForWritegetVariableAccessorsForReadgetVariableNamesgetVariableTableCopygetVariableTableManagergetVariableTableSizegetVariableTableSizeWithExtrashasObjectIDinheritinheritedinitializeinitializeinitialize_copyinvalidateCacheDescendantsinvokeinvokeinvokeinvokeinvokeinvokeinvokeinvokeinvokeinvokeinvokeinvokeFrominvokeFrominvokeFrominvokeFrominvokeFrominvokeFrominvokeFrominvokeFrominvokeFrominvokeFrominvokeInheritedinvokePublicisReifiableisSingletonmarshalmarshalmarshalTomarshalTomarshalWithnearestReifiedClassnewClassnewClassnewClassnewClassnewClassnewClassnewClassnewClassnewClassBootstrapnewInstancenewInstancenewInstancenewInstancenewInstancenewInstancenotVisibleAndNotMethodMissingreifiedClassreifiedClassreifyreifyreifyreifyreifyWithAncestorsreifyWithAncestorsreifyWithAncestorsreifyWithAncestorsremoveSubclassreplaceSubclasssetAllocatorsetClassAllocatorsetClassConfigsetMarshalsetReifiedClasssetRubyClassAllocatorsetRubyStaticAllocatorsmartDumpsmartDumpsmartLoadNewUsersmartLoadOldUsersubclassessubclassessubclassessuperclasstoJavatoSingletonClasstoSingletonClassunmarshalunmarshalunmarshalFromunmarshalFrom

Field Detail

originback to summary
protected final RubyModule origin

The module to which this include origins.

Constructor Detail

IncludedModuleback to summary
public IncludedModule(Ruby runtime, RubyClass superClass, RubyModule origin)

Method Detail

getClassVariablesback to summary
protected synchronized Map<String, IRubyObject> getClassVariables()

Overrides org.jruby.RubyModule.getClassVariables.

Annotations
@Override
getClassVariablesForReadback to summary
protected Map<String, IRubyObject> getClassVariablesForRead()

Overrides org.jruby.RubyModule.getClassVariablesForRead.

Annotations
@Override
getNameback to summary
public String getName(ThreadContext context)

Overrides org.jruby.RubyModule.getName.

Doc from org.jruby.RubyModule.getName.

Generate a fully-qualified class name or a #-style name for anonymous and singleton classes. Ruby C equivalent = "classname"

Returns:String

The generated class name

Annotations
@Override
getNonIncludedClassback to summary
public RubyModule getNonIncludedClass()

Overrides org.jruby.RubyModule.getNonIncludedClass.

Deprecated

Annotations
@Deprecated
@Override
getOriginback to summary
public RubyModule getOrigin()

Overrides org.jruby.RubyModule.getOrigin.

Doc from org.jruby.RubyModule.getOrigin.

In an included or prepended module what is the ACTUAL module it represents?

Returns:RubyModule

the actual module of an included/prepended module.

Annotations
@Override
idback to summary
public IRubyObject id()

Overrides org.jruby.RubyBasicObject.id.

Implements org.jruby.runtime.builtin.IRubyObject.id.

We don't want to reveal ourselves to Ruby code, so origin this operation.

Returns:IRubyObject

Doc from org.jruby.runtime.builtin.IRubyObject.id.

the object id

Annotations
@Override
isClassback to summary
public boolean isClass()

Overrides org.jruby.RubyClass.isClass.

Implements org.jruby.runtime.builtin.IRubyObject.isClass.

Doc from org.jruby.RubyBasicObject.isClass.

Specifically polymorphic method that are meant to be overridden by classes to specify that they are classes in an easy way.

Returns:boolean

Doc from org.jruby.runtime.builtin.IRubyObject.isClass.

true if an object is Ruby Class instance (note that it will return false for Ruby singleton classes).

Annotations
@Override
isImmediateback to summary
public boolean isImmediate()

Overrides org.jruby.RubyBasicObject.isImmediate.

Implements org.jruby.runtime.builtin.IRubyObject.isImmediate.

Doc from org.jruby.RubyBasicObject.isImmediate.

Is object immediate (def: Fixnum, Symbol, true, false, nil?).

Returns:boolean

Doc from org.jruby.runtime.builtin.IRubyObject.isImmediate.

boolean

Annotations
@Override
isModuleback to summary
public boolean isModule()

Overrides org.jruby.RubyClass.isModule.

Implements org.jruby.runtime.builtin.IRubyObject.isModule.

Doc from org.jruby.RubyBasicObject.isModule.

Specifically polymorphic method that are meant to be overridden by modules to specify that they are modules in an easy way.

Returns:boolean

Doc from org.jruby.runtime.builtin.IRubyObject.isModule.

true if an object is Ruby Module instance (note that it will return false for Ruby Classes).

Annotations
@Override
setMetaClassback to summary
public void setMetaClass(RubyClass newRubyClass)

Overrides org.jruby.RubyBasicObject.setMetaClass.

Doc from org.jruby.RubyBasicObject.setMetaClass.

Makes it possible to change the metaclass of an object. In practice, this is a simple version of Smalltalks Become, except that it doesn't work when we're dealing with subclasses. In practice it's used to change the singleton/meta class used, without changing the "real" inheritance chain.

Parameters
newRubyClass:RubyClass

the meta class to set

Annotations
@Override