66 ! |
66 ! |
67 |
67 |
68 lookupMethodForSelector:selector directedTo:initialSearchClass for:aReceiver withArguments:argArrayOrNil from:sendingContext |
68 lookupMethodForSelector:selector directedTo:initialSearchClass for:aReceiver withArguments:argArrayOrNil from:sendingContext |
69 "as a courtesy to the smalltalker, try to map methods" |
69 "as a courtesy to the smalltalker, try to map methods" |
70 | m | |
70 | m | |
71 m := self javaLookupMethodForSelector: selector for: aReceiver withArguments: argArrayOrNil. |
71 self halt. |
72 m ifNotNil: [ ^ m ] . |
72 "/ m := self javaLookupMethodForSelector: selector for: aReceiver withArguments: argArrayOrNil. |
|
73 "/ m ifNotNil: [ ^ m ] . |
73 " |
74 " |
74 I am not sure, if we should invoke builtin lookup. It will search for the Smalltalk-like methods. |
75 I am not sure, if we should invoke builtin lookup. It will search for the Smalltalk-like methods. |
75 For example, if you invoke #isNumber on java.lang.String |
76 For example, if you invoke #isNumber on java.lang.String |
76 a) you should get 'doesNotUnderstand' |
77 a) you should get 'doesNotUnderstand' |
77 b) the isNumber from Object is invoked (currently implemented) |
78 b) the isNumber from Object is invoked (currently implemented) |
78 " |
79 " |
79 self breakPoint: #libjava. |
80 self breakPoint: #libjava. |
80 ^ self smalltalkLookupMethodForSelector:selector directedTo:initialSearchClass for:aReceiver withArguments:argArrayOrNil from:sendingContext |
81 ^ self smalltalkLookupMethodForSelector:selector directedTo:initialSearchClass for:aReceiver withArguments:argArrayOrNil from:sendingContext |
81 |
82 |
82 "Created: / 21-02-2011 / 13:38:55 / kursjan <kursjan@fit.cvut.cz>" |
83 "Created: / 21-02-2011 / 13:38:55 / kursjan <kursjan@fit.cvut.cz>" |
83 "Modified: / 25-02-2011 / 20:03:30 / kursjan <kursjan@fit.cvut.cz>" |
84 "Modified: / 11-04-2011 / 20:19:50 / kursjan <kursjan@fit.cvut.cz>" |
84 ! |
85 ! |
85 |
86 |
86 smalltalkLookupMethodForSelector:selector directedTo:initialSearchClass for:aReceiver withArguments:argArrayOrNil from:sendingContext |
87 smalltalkLookupMethodForSelector:selector directedTo:initialSearchClass for:aReceiver withArguments:argArrayOrNil from:sendingContext |
87 ^ Lookup builtin lookupMethodForSelector:selector directedTo:initialSearchClass for:aReceiver withArguments:argArrayOrNil from:sendingContext. |
88 ^ Lookup builtin lookupMethodForSelector:selector directedTo:initialSearchClass for:aReceiver withArguments:argArrayOrNil from:sendingContext. |
88 |
89 |