1
|
1 |
"{ Package: 'stx:goodies/metacello' }"
|
|
2 |
|
|
3 |
Object subclass:#MetacelloMethodSpec
|
|
4 |
instanceVariableNames:'project selector category versionString methodSections'
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'Metacello-Core-Constructors'
|
|
8 |
!
|
|
9 |
|
|
10 |
|
|
11 |
!MetacelloMethodSpec methodsFor:'accessing'!
|
|
12 |
|
|
13 |
category
|
|
14 |
^ category
|
|
15 |
!
|
|
16 |
|
|
17 |
category: anObject
|
|
18 |
category := anObject
|
|
19 |
!
|
|
20 |
|
|
21 |
methodSections
|
|
22 |
|
|
23 |
methodSections == nil ifTrue: [ methodSections := OrderedCollection new ].
|
|
24 |
^ methodSections
|
|
25 |
!
|
|
26 |
|
|
27 |
methodSections: anObject
|
|
28 |
methodSections := anObject
|
|
29 |
!
|
|
30 |
|
|
31 |
project
|
|
32 |
^ project
|
|
33 |
!
|
|
34 |
|
|
35 |
project: anObject
|
|
36 |
project := anObject
|
|
37 |
!
|
|
38 |
|
|
39 |
selector
|
|
40 |
^ selector
|
|
41 |
!
|
|
42 |
|
|
43 |
selector: anObject
|
|
44 |
selector := anObject
|
|
45 |
!
|
|
46 |
|
|
47 |
versionString
|
|
48 |
^ versionString
|
|
49 |
!
|
|
50 |
|
|
51 |
versionString: aStringOrSymbol
|
|
52 |
versionString := aStringOrSymbol
|
|
53 |
! !
|
|
54 |
|
|
55 |
!MetacelloMethodSpec methodsFor:'method generation'!
|
|
56 |
|
|
57 |
compileMethod
|
|
58 |
|
|
59 |
(project configuration class
|
|
60 |
compile: self methodSource
|
|
61 |
classified: self category) == nil
|
|
62 |
ifTrue: [ self error: 'Error compiling the method' ]
|
|
63 |
!
|
|
64 |
|
|
65 |
methodSource
|
|
66 |
|
|
67 |
self subclassResponsibility
|
|
68 |
! !
|
|
69 |
|
|
70 |
!MetacelloMethodSpec class methodsFor:'documentation'!
|
|
71 |
|
|
72 |
version_SVN
|
|
73 |
^ '$Id:: $'
|
|
74 |
! !
|