/
CDSlotNode.class.st
97 lines (77 loc) · 1.42 KB
/
CDSlotNode.class.st
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
"
I represent a slot contain in a class. An instance variable for example.
"
Class {
#name : #CDSlotNode,
#superclass : #CDNode,
#instVars : [
'slot',
'node',
'index',
'start',
'stop',
'name',
'typeName'
],
#category : #'ClassParser-Model'
}
{ #category : #'instance-creation' }
CDSlotNode class >> node: aNode name: aName typeName: aTypeName start: start stop: stop [
^ self new
node: aNode;
name: aName;
typeName: aTypeName;
start: start;
stop: stop;
yourself
]
{ #category : #transforming }
CDSlotNode >> asSlot [
^self name asSlot
]
{ #category : #accessing }
CDSlotNode >> index: anInteger [
index := anInteger
]
{ #category : #accessing }
CDSlotNode >> name [
^ name
]
{ #category : #accessing }
CDSlotNode >> name: aString [
name := aString
]
{ #category : #accessing }
CDSlotNode >> node: aNode [
node := aNode
]
{ #category : #printing }
CDSlotNode >> printOn: aStream [
aStream
nextPutAll: self class name;
nextPutAll: '(';
nextPutAll: name;
nextPutAll: ' => ';
nextPutAll: typeName;
nextPutAll: ')'
]
{ #category : #selection }
CDSlotNode >> start [
^ start
]
{ #category : #accessing }
CDSlotNode >> start: anInteger [
start := anInteger
]
{ #category : #selection }
CDSlotNode >> stop [
^ stop
]
{ #category : #accessing }
CDSlotNode >> stop: anInteger [
stop := anInteger
]
{ #category : #accessing }
CDSlotNode >> typeName: aString [
typeName := aString
]