I forgot to mention that I'm talking in MooseVW :).
importClass: aClass
| class comment |
importingContext shouldImportClass ifTrue: [
class := self ensureClass: aClass.
class stub: false.
aClass subclasses do: [ :each | self ensureClass: each ].
importingContext shouldImportMethod ifTrue: [
aClass methodDictionary values do: [ :each | self
ensureMethod: each ].
(class methods contains: [:each | each isAbstract])
ifTrue: [ class isAbstract: true ]].
importingContext shouldImportComment ifTrue: [
aClass comment isEmpty ifFalse: [
comment := self addEntity: FAMIXComment new.
comment content: aClass comment.
comment setBelongsTo: class.
class addComment: comment]].
aClass isMeta ifFalse: [ self importClass: aClass class ]].
createMethod: aCompiledMethod
| method thisClass |
method := methods at: aCompiledMethod put: FAMIXMethod new.
method setName: aCompiledMethod selector.
thisClass := aCompiledMethod mclass.
method setBelongsTo: (self ensureClass: thisClass).
method belongsTo addMethod: method.
method packagedIn: (self ensurePackage: aCompiledMethod
containingPackage).
(method belongsTo packagedIn ~~ method packagedIn) ifTrue: [
method packagedIn addExtendedClass: method belongsTo.
method belongsTo addExtendedInPackages: method packagedIn
].
method setHasClassScope: (aCompiledMethod mclass isMeta).
method setCategory: (aCompiledMethod mclass organization
categoryOfElement: aCompiledMethod selector).
method bePublic.
importingContext shouldImportMethodBody ifTrue: [
| visitor |
visitor := SmalltalkMethodVisitor on: self.
visitor runWith: aCompiledMethod and: method ].
^method
I will check in our lovely moose and our incredibly more efficient
environment.
Stef
Le 10/3/15 13:01, stepharo a écrit :
Hi
I'm wondering how we handle the following case:
- we have a method with the same name on instance and class
- we import by merging class and metaclass.
I remember that I payed attention to that for ClassVariable but I do
not see
how I handle it in the SmalltalkImporter.
Does one of you remember?
Stef
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev