611
|
1 |
'From Smalltalk/X, Version:3.5.4 on 25-sep-1999 at 11:12:45 pm' !
|
|
2 |
|
|
3 |
JavaMethodWithHandler variableSubclass:#JavaNativeMethod
|
|
4 |
instanceVariableNames:'nativeImplementation'
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'Java-Classes'
|
|
8 |
!
|
|
9 |
|
616
|
10 |
!JavaNativeMethod class methodsFor:'initialization'!
|
|
11 |
|
|
12 |
initialize
|
|
13 |
self flags:(self flags bitOr:Behavior flagJavaMethod).
|
|
14 |
! !
|
|
15 |
|
611
|
16 |
|
|
17 |
!JavaNativeMethod methodsFor:'accessing'!
|
|
18 |
|
|
19 |
nativeImplementation
|
|
20 |
"return the value of the instance variable 'nativeImplementation' (automatically generated)"
|
|
21 |
|
|
22 |
^ nativeImplementation
|
|
23 |
|
|
24 |
"Created: / 25.9.1999 / 23:08:00 / cg"
|
|
25 |
!
|
|
26 |
|
|
27 |
nativeImplementation:something
|
|
28 |
"set the value of the instance variable 'nativeImplementation' (automatically generated)"
|
|
29 |
|
|
30 |
nativeImplementation := something.
|
|
31 |
|
|
32 |
"Created: / 25.9.1999 / 23:08:00 / cg"
|
|
33 |
! !
|
|
34 |
|
|
35 |
!JavaNativeMethod methodsFor:'vm support'!
|
|
36 |
|
|
37 |
nativeMethodInvokation
|
|
38 |
|nm sel|
|
|
39 |
|
|
40 |
nativeImplementation isNil ifTrue:[
|
616
|
41 |
nm := selector copyWithoutLast:signature size.
|
|
42 |
sel := ('_' , javaClass lastName , '_' , nm , ':') asSymbol.
|
611
|
43 |
|
616
|
44 |
nativeImplementation := (JavaVM class compiledMethodAt:sel).
|
|
45 |
nativeImplementation isNil ifTrue:[
|
|
46 |
^ JavaVM
|
|
47 |
perform:sel
|
|
48 |
with:thisContext sender.
|
|
49 |
].
|
611
|
50 |
].
|
|
51 |
|
|
52 |
^ nativeImplementation
|
616
|
53 |
valueWithReceiver:JavaVM
|
|
54 |
arguments:(Array with:thisContext sender)
|
|
55 |
selector:selector
|
|
56 |
search:JavaVM class
|
|
57 |
sender:nil
|
611
|
58 |
|
|
59 |
"Modified: / 25.9.1999 / 23:10:29 / cg"
|
|
60 |
! !
|
|
61 |
|
|
62 |
!JavaNativeMethod class methodsFor:'documentation'!
|
|
63 |
|
|
64 |
version
|
616
|
65 |
^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaNativeMethod.st,v 1.2 1999/11/09 09:24:33 cg Exp $'
|
611
|
66 |
! !
|