FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
jruby/core/src/main/java/org/jruby/IncludedModule.java at master · jruby/jruby · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
jruby
/
jruby
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
946
Star
3.9k
Code
Issues
840
Pull requests
111
Discussions
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
jruby
/
core
/
src
/
main
/
java
/
org
/
jruby
/
IncludedModule.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
75 lines (61 loc) · 1.84 KB
Breadcrumbs
jruby
/
core
/
src
/
main
/
java
/
org
/
jruby
/
IncludedModule.java
Copy path
File metadata and controls
75 lines (61 loc) · 1.84 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package
org
.
jruby
;
import
java
.
util
.
Map
;
import
org
.
jruby
.
runtime
.
ThreadContext
;
import
org
.
jruby
.
runtime
.
builtin
.
IRubyObject
;
public
class
IncludedModule
extends
RubyClass
implements
DelegatedModule
{
public
IncludedModule
(
Ruby
runtime
,
RubyClass
superClass
,
RubyModule
origin
) {
super
(
runtime
,
superClass
,
false
);
this
.
origin
=
origin
;
this
.
metaClass
=
origin
.
metaClass
;
if
(
superClass
!=
null
) {
classIndex
(
superClass
.
getClassIndex
());
// use same ClassIndex as metaclass, since we're technically still of that type
}
}
@
Override
public
boolean
isModule
() {
return
false
;
}
@
Override
public
boolean
isClass
() {
return
false
;
}
@
Override
public
boolean
isImmediate
() {
return
true
;
}
@
Override
public
void
setMetaClass
(
RubyClass
newRubyClass
) {
throw
new
UnsupportedOperationException
(
"An included class is only a wrapper for a module"
);
}
@
Override
public
String
getName
(
ThreadContext
context
) {
return
origin
.
getName
(
context
);
}
@
Override
public
RubyModule
getOrigin
() {
return
origin
;
}
@
Deprecated
(
since
=
"10.0.3.0"
)
@
Override
public
IRubyObject
id
() {
return
origin
.
id
();
}
/**
* We don't want to reveal ourselves to Ruby code, so origin this
* operation.
*/
@
Override
public
RubyInteger
__id__
(
ThreadContext
context
) {
return
origin
.
__id__
(
context
);
}
@
Override
protected
synchronized
Map
<
String
,
IRubyObject
>
getClassVariables
() {
return
origin
.
getClassVariables
();
}
@
Override
protected
Map
<
String
,
IRubyObject
>
getClassVariablesForRead
() {
return
origin
.
getClassVariablesForRead
();
}
/** The module to which this include origins. */
protected
final
RubyModule
origin
;
}
Back
|
FazBrowse Home
|
New Git URL