1"====================================================================== 2| 3| Java run-time support. java.lang.Object native methods. 4| 5| 6 ======================================================================" 7 8 9"====================================================================== 10| 11| Copyright 2003 Free Software Foundation, Inc. 12| Written by Paolo Bonzini. 13| 14| This file is part of GNU Smalltalk. 15| 16| The GNU Smalltalk class library is free software; you can redistribute it 17| and/or modify it under the terms of the GNU General Public License 18| as published by the Free Software Foundation; either version 2, or (at 19| your option) any later version. 20| 21| The GNU Smalltalk class library is distributed in the hope that it will be 22| useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 23| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 24| Public License for more details. 25| 26| You should have received a copy of the GNU Lesser General Public License 27| along with the GNU Smalltalk class library; see the file COPYING. If not, 28| write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, 29| Boston, MA 02110-1301, USA. 30| 31 ======================================================================" 32 33 34!JavaVM methodsFor: 'java.lang.Object'! 35 36java_lang_Object_getClass 37 <javaNativeMethod: #'getClass()Ljava/lang/Class;' 38 for: #{Java.java.lang.Object} static: false> 39 ^self class javaLangClass 40! 41 42java_lang_Object_hashCode 43 <javaNativeMethod: #'hashCode()I' 44 for: #{Java.java.lang.Object} static: false> 45 ^self identityHash 46! 47 48java_lang_Object_notify 49 | waitSemaphores | 50 <javaNativeMethod: #'notify()V' 51 for: #{Java.java.lang.Object} static: false> 52 53 JavaMonitor notify: self! 54 55java_lang_Object_notifyAll 56 | waitSemaphores | 57 <javaNativeMethod: #'notifyAll()V' 58 for: #{Java.java.lang.Object} static: false> 59 60 JavaMonitor notifyAll: self! 61 62java_lang_Object_wait_long: arg1 int: arg2 63 | s p waitSemaphores | 64 <javaNativeMethod: #'wait(JI)V' 65 for: #{Java.java.lang.Object} static: false> 66 67 JavaMonitor waitOn: self timeout: arg1! 68 69java_lang_Object_clone 70 <javaNativeMethod: #'clone()Ljava/lang/Object;' 71 for: #{Java.java.lang.Object} static: false> 72 (self implementsInterface: Java.java.lang.Cloneable asJavaClass) 73 ifFalse: [ JavaVM throw: Java.java.lang.CloneNotSupportedException ]. 74 75 ^self shallowCopy 76! ! 77 78