JavaNativeMethodImpl_OpenJDK7.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 07 Feb 2014 09:07:22 +0100
branchdevelopment
changeset 3018 7ff48afbef00
parent 2959 3e837849ce3e
child 3019 c04668cd040d
permissions -rw-r--r--
Fixes in natives for non-TRADITIONAL_STACK machines. On some machines stc accesses method arguments through context. To do so, it #defines argumets as simething __context[1]. If then the structure/union member has the same name as parameter, preprocessor expands it and therefore the C code is no longer valid. Solutions is to rename structure/union members - if possible.

"
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
                            SWING Research Group, Czech Technical University in Prague

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
"{ Package: 'stx:libjava' }"

JavaNativeMethodImpl_OpenJDK6 subclass:#JavaNativeMethodImpl_OpenJDK7
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:'JavaVMData'
	category:'Languages-Java-Support-OpenJDK7'
!

!JavaNativeMethodImpl_OpenJDK7 class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
                            SWING Research Group, Czech Technical University in Prague

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
! !

!JavaNativeMethodImpl_OpenJDK7 class methodsFor:'native - java.io'!

_java_io_FileOutputStream_open: this _: a1 _: a2

    <javanative: 'java/io/FileOutputStream' name: 'open(Ljava/lang/String;Z)V'>

    ^ self commonOpen: this path: a1 forAppend: a2 == 1

    "Modified: / 12-11-2013 / 22:48:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_FileOutputStream_write: this _: byte _: append

    <javanative: 'java/io/FileOutputStream' name: 'write(IZ)V'>
    "
    /**
     * Writes the specified byte to this file output stream.
     *
     * @param   b   the byte to be written.
     * @param   append   {@code true} if the write operation first
     *     advances the position to the end of file
     */
    "
    | fdobj fd stream b |

    "/Java byte is signed, make it integer in 0-255"
    b := byte < 0 ifTrue:[ byte + 256] ifFalse:[byte ].
    fdobj := (this instVarNamed: #fd).
    fd    := fdobj instVarNamed: #fd.
    stream := self getOpenFileAt:fd.
    [
        append == 1 ifTrue:[ stream setToEnd ].
        stream nextPut: b.
    ] on: Error do:[:ex|
        JavaVM throwIOExceptionWithMessage:ex description
    ]

    "Modified: / 13-11-2013 / 09:34:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_FileOutputStream_writeBytes: this _:bytes _: offset _: count _: append

    <javanative: 'java/io/FileOutputStream' name: 'writeBytes([BIIZ)V'>

    ^ self anyStream_write: this bytes: bytes offset: offset count: count append: append == 1.

    "Modified: / 08-02-2013 / 11:57:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_Win32FileSystem_canonicalize0: this _: a1

    <javanative: 'java/io/Win32FileSystem' name: 'canonicalize0(Ljava/lang/String;)Ljava/lang/String;'>

    ^ self _java_io_WinNTFileSystem_canonicalize0: this _: a1

    "Modified: / 11-11-2013 / 22:00:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_Win32FileSystem_canonicalizeWithPrefix0: this _: a1 _: a2

    <javanative: 'java/io/Win32FileSystem' name: 'canonicalizeWithPrefix0(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;'>

    ^ self _java_io_WinNTFileSystem_canonicalizeWithPrefix0: this _: a1 _: a2

    "Modified: / 11-11-2013 / 22:01:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_Win32FileSystem_checkAccess: this _: a1 _: a2

    <javanative: 'java/io/Win32FileSystem' name: 'checkAccess(Ljava/io/File;I)Z'>

    ^ self _java_io_WinNTFileSystem_checkAccess: this _: a1 _: a2

    "Modified: / 11-11-2013 / 22:01:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_Win32FileSystem_createDirectory: this _: a1

    <javanative: 'java/io/Win32FileSystem' name: 'createDirectory(Ljava/io/File;)Z'>

    ^ self _java_io_WinNTFileSystem_createDirectory: this _: a1

    "Modified: / 11-11-2013 / 22:01:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_Win32FileSystem_createFileExclusively: this _: a1

    <javanative: 'java/io/Win32FileSystem' name: 'createFileExclusively(Ljava/lang/String;)Z'>

    ^ self _java_io_WinNTFileSystem_createFileExclusively: this _: a1

    "Modified: / 11-11-2013 / 22:01:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_Win32FileSystem_delete0: this _: a1

    <javanative: 'java/io/Win32FileSystem' name: 'delete0(Ljava/io/File;)Z'>

    ^ self _java_io_Win32FileSystem_delete0: this _: a1

    "Modified: / 11-11-2013 / 22:02:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_Win32FileSystem_getBooleanAttributes: this _: a1

    <javanative: 'java/io/Win32FileSystem' name: 'getBooleanAttributes(Ljava/io/File;)I'>

    ^ self _java_io_Win32FileSystem_getBooleanAttributes: this _: a1

    "Modified: / 11-11-2013 / 22:02:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_Win32FileSystem_getDriveDirectory: this _: a1

    <javanative: 'java/io/Win32FileSystem' name: 'getDriveDirectory(I)Ljava/lang/String;'>

    ^ self _java_io_Win32FileSystem_getDriveDirectory: this _: a1

    "Modified: / 11-11-2013 / 22:02:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_Win32FileSystem_getLastModifiedTime: this _: a1

    <javanative: 'java/io/Win32FileSystem' name: 'getLastModifiedTime(Ljava/io/File;)J'>

    ^ self _java_io_Win32FileSystem_getLastModifiedTime: this _: a1

    "Modified: / 11-11-2013 / 22:02:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_Win32FileSystem_getLength: this _: a1

    <javanative: 'java/io/Win32FileSystem' name: 'getLength(Ljava/io/File;)J'>

    ^ self _java_io_Win32FileSystem_getLength: this _: a1

    "Modified: / 11-11-2013 / 22:02:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_Win32FileSystem_getSpace0: this _: a1 _: a2

    <javanative: 'java/io/Win32FileSystem' name: 'getSpace0(Ljava/io/File;I)J'>

    ^ self _java_io_Win32FileSystem_getSpace0: this _: a1 _: a2

    "Modified: / 11-11-2013 / 22:02:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_Win32FileSystem_list: this _: a1

    <javanative: 'java/io/Win32FileSystem' name: 'list(Ljava/io/File;)[Ljava/lang/String;'>

    ^ self _java_io_Win32FileSystem_list: this _: a1

    "Modified: / 11-11-2013 / 22:02:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_Win32FileSystem_listRoots0: this

    <javanative: 'java/io/Win32FileSystem' name: 'listRoots0()I'>

    ^ self _java_io_Win32FileSystem_listRoots0: this

    "Modified: / 11-11-2013 / 22:03:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_Win32FileSystem_rename0: this _: a1 _: a2

    <javanative: 'java/io/Win32FileSystem' name: 'rename0(Ljava/io/File;Ljava/io/File;)Z'>

    ^ self _java_io_Win32FileSystem_rename0: this _: a1 _: a2

    "Modified: / 11-11-2013 / 22:03:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_Win32FileSystem_setLastModifiedTime: this _: a1 _: a2 _: a3

    <javanative: 'java/io/Win32FileSystem' name: 'setLastModifiedTime(Ljava/io/File;J)Z'>

    ^ self _java_io_Win32FileSystem_setLastModifiedTime: this _: a1 _: a2 _: a3

    "Modified: / 11-11-2013 / 22:03:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_Win32FileSystem_setPermission: this _: a1 _: a2 _: a3 _: a4

    <javanative: 'java/io/Win32FileSystem' name: 'setPermission(Ljava/io/File;IZZ)Z'>

    ^ self _java_io_Win32FileSystem_setPermission: this _: a1 _: a2 _: a3 _: a4

    "Modified: / 11-11-2013 / 22:03:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_Win32FileSystem_setReadOnly: this _: a1

    <javanative: 'java/io/Win32FileSystem' name: 'setReadOnly(Ljava/io/File;)Z'>

    ^ self _java_io_Win32FileSystem_setReadOnly: this _: a1

    "Modified: / 11-11-2013 / 22:03:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_io_WinNTFileSystem_getDriveDirectory: this _: a1

    <javanative: 'java/io/WinNTFileSystem' name: 'getDriveDirectory(I)Ljava/lang/String;'>

    ^ JavaVM unimplementedNativeMethodSignal raise
!

_java_io_WinNTFileSystem_getSpace0: this _: a1 _: a2

    <javanative: 'java/io/WinNTFileSystem' name: 'getSpace0(Ljava/io/File;I)J'>

    ^ JavaVM unimplementedNativeMethodSignal raise
!

_java_io_WinNTFileSystem_initIDs: this

    <javanative: 'java/io/WinNTFileSystem' name: 'initIDs()V'>

    ^ JavaVM unimplementedNativeMethodSignal raise
!

_java_io_WinNTFileSystem_rename0: this _: a1 _: a2

    <javanative: 'java/io/WinNTFileSystem' name: 'rename0(Ljava/io/File;Ljava/io/File;)Z'>

    ^ JavaVM unimplementedNativeMethodSignal raise
!

_java_io_WinNTFileSystem_setLastModifiedTime: this _: a1 _: a2 _: a3

    <javanative: 'java/io/WinNTFileSystem' name: 'setLastModifiedTime(Ljava/io/File;J)Z'>

    ^ JavaVM unimplementedNativeMethodSignal raise
!

_java_io_WinNTFileSystem_setPermission: this _: a1 _: a2 _: a3 _: a4

    <javanative: 'java/io/WinNTFileSystem' name: 'setPermission(Ljava/io/File;IZZ)Z'>

    ^ JavaVM unimplementedNativeMethodSignal raise
!

_java_io_WinNTFileSystem_setReadOnly: this _: a1

    <javanative: 'java/io/WinNTFileSystem' name: 'setReadOnly(Ljava/io/File;)Z'>

    ^ JavaVM unimplementedNativeMethodSignal raise
! !

!JavaNativeMethodImpl_OpenJDK7 class methodsFor:'native - java.lang'!

_java_lang_ClassLoader_getCaller: this _: a1

    <javanative: 'java/lang/ClassLoader' name: 'getCaller(I)Ljava/lang/Class;'>

    "/ index 0: java.lang.ClassLoader.class
    "/ index 1: the immediate caller of index 0.
    "/ index 2: the immediate caller of index 1.

    | ctx |

    ctx := self nativeContext sender.
    a1 timesRepeat:[
        ctx := ctx sender
    ].
    ^JavaVM reflection javaClassObjectForClass: ctx receiver class theNonMetaclass

    "Modified: / 07-02-2013 / 23:35:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_lang_Thread_setNativeName: this _: a1

    <javanative: 'java/lang/Thread' name: 'setNativeName(Ljava/lang/String;)V'>

    ^ JavaVM unimplementedNativeMethodSignal raise
!

_java_lang_Throwable_fillInStackTrace: this _: a1

    <javanative: 'java/lang/Throwable' name: 'fillInStackTrace(I)Ljava/lang/Throwable;'>

    | java_lang_Throwable  exceptionObject  list  con |

    java_lang_Throwable := Java classNamed: 'java/lang/Throwable'.
    exceptionObject := this.

    "/
    "/ debugging only
    "/

    (java_lang_Throwable notNil and:[(exceptionObject isKindOf: java_lang_Throwable) not]) ifTrue: [
        self error:'Thrown object is not a java.lang.Throwable'.
    ].
    con := self nativeContext sender.
    "/ Just a guess, there is no comment what the parameter means...
    a1 timesRepeat: [ con := con sender ].

    "/
    "/ we are not interrested in all intermediate Exception frames ...
    "/

    FullExceptionTrace ifFalse: [
        "/ first, skip any JavaVM contexts
        [ con receiver == exceptionObject ] whileFalse: [ con := con sender ].

        "/ then, all exception-init contexts

        [ con receiver == exceptionObject ] whileTrue: [ con := con sender ].
    ].
    list := OrderedCollection new.
    [ con notNil ] whileTrue: [
        (con isJavaContext) ifTrue: [
            "/ add a copy, in case the context continues with some
            "/ cleanup ...
            list add: con shallowCopy
        ].
        con := con sender
    ].
    exceptionObject instVarNamed: 'backtrace' put: (list asArray).
    ^ nil.

    "Modified: / 08-02-2013 / 01:28:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_lang_UNIXProcess_forkAndExec: this _: a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _: a8

    <javanative: 'java/lang/UNIXProcess' name: 'forkAndExec([B[BI[BI[B[IZ)I'>

    ^ JavaVM unimplementedNativeMethodSignal raise
! !

!JavaNativeMethodImpl_OpenJDK7 class methodsFor:'native - java.util.zip'!

_java_util_zip_ZipFile_getCommentBytes: this _: jzentry _: a2

    <javanative: 'java/util/zip/ZipFile' name: 'getCommentBytes(J)[B'>

    |  zmember |

    zmember := ZipEntryCache at: jzentry.
    ^zmember fileComment asByteArray

    "Modified: / 08-02-2013 / 09:46:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_util_zip_ZipFile_getEntry: this _: a1 _: a2 _: a3 _: a4

    <javanative: 'java/util/zip/ZipFile' name: 'getEntry(J[BZ)J'>
    "
    !!!!!!WARNING!!!!!!!!
    In Open JDK 7, it takes byte array instead of string like in Open JDK 6!!!!!!!!
    "

    | zipArchive  filename  member |

    zipArchive := self getZipArchiveAt:a1.
    filename := a3 asString.
    member := (zipArchive findMemberAllowForMissingTrailingSlash: filename).
    member isNil ifTrue: [
        ^ 0
    ] ifFalse: [
        "/^ ZipEntryCache indexOf: member ifAbsent:[
            | index |

            ZipEntryCacheLock critical:[
                ZipEntryCacheFirstFree == 0 ifTrue:[
                    ZipEntryCache add: member.
                    index := ZipEntryCache size.
                ] ifFalse:[
                    index := ZipEntryCacheFirstFree.
                    ZipEntryCacheFirstFree := ZipEntryCache at: index.
                    ZipEntryCache at: index put: member.
                ].
            ].
            "/Logger
            "/    log: 'java.util.zip.ZipFile.getEntry() called for ', index printString
            "/    severity: #debug
            "/    facility: 'JVM'.
            ^ index.
        "/].
    ]

    "Modified: / 10-12-2013 / 00:56:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_util_zip_ZipFile_getEntryBytes: this _: jzentry _: a2 _: type

    <javanative: 'java/util/zip/ZipFile' name: 'getEntryBytes(JI)[B'>

    |  zmember |

    zmember := ZipEntryCache at: jzentry.
    type == 0 "JZENTRY_NAME" ifTrue:[
        ^zmember fileNameLength == 0
            ifTrue:[nil]
            ifFalse:[zmember fileName asByteArray].
    ].
    type == 1 "JZENTRY_EXTRA" ifTrue:[
        ^zmember extraFieldLength == 0
            ifTrue:[nil]
            ifFalse:[zmember extraField asByteArray].
    ].
    type == 2 "JZENTRY_COMMENT" ifTrue:[
        ^zmember fileCommentLength == 0
            ifTrue:[nil]
            ifFalse:[zmember fileComment asByteArray].
    ].
    self breakPoint: #jv.
    JavaVM throwZipException: 'Unknown type in getEntryBytes()'.

    "Modified: / 15-11-2013 / 22:58:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_util_zip_ZipFile_getEntryCSize: this _: jzentry _: a2

    <javanative: 'java/util/zip/ZipFile' name: 'getEntryCSize(J)J'>

    |  zmember |

    zmember := ZipEntryCache at: jzentry.
    ^zmember compressedSize

    "Modified: / 08-02-2013 / 09:44:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_util_zip_ZipFile_getEntryCrc: this _: jzentry _: a2

    <javanative: 'java/util/zip/ZipFile' name: 'getEntryCrc(J)J'>

    |  zmember |

    zmember := ZipEntryCache at: jzentry.
    ^zmember crc32

    "Modified: / 08-02-2013 / 09:45:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_util_zip_ZipFile_getEntryFlag: this _: jzentry _: a2

    <javanative: 'java/util/zip/ZipFile' name: 'getEntryFlag(J)I'>

    |  zmember |

    zmember := ZipEntryCache at: jzentry.
    ^zmember generalPurposBitFlag

    "Modified: / 08-02-2013 / 09:42:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_util_zip_ZipFile_getEntryMethod: this _: jzentry _: a2

    <javanative: 'java/util/zip/ZipFile' name: 'getEntryMethod(J)I'>

    |  zmember |

    zmember := ZipEntryCache at: jzentry.
    ^zmember compressionMethod

    "Modified: / 08-02-2013 / 09:44:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_util_zip_ZipFile_getEntrySize: this _: jzentry _: a2

    <javanative: 'java/util/zip/ZipFile' name: 'getEntrySize(J)J'>

    |  zmember |

    zmember := ZipEntryCache at: jzentry.
    ^zmember uncompressedSize

    "Modified: / 08-02-2013 / 09:43:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_util_zip_ZipFile_getEntryTime: this _: jzentry _: a2

    <javanative: 'java/util/zip/ZipFile' name: 'getEntryTime(J)J'>

    |  zmember |

    zmember := ZipEntryCache at: jzentry.
    ^zmember lastModFileTime

    "Modified: / 08-02-2013 / 09:45:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_java_util_zip_ZipFile_open: this _: a1 _: a2 _: a3 _: a4 _: usemmap

    <javanative: 'java/util/zip/ZipFile' name: 'open(Ljava/lang/String;IJZ)J'>

    "No mmap support for zip files yet, use Open JDK 6 implementation"

    ^self _java_util_zip_ZipFile_open: this _: a1 _: a2 _: a3 _: a4

    "Modified: / 23-04-2013 / 10:00:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!JavaNativeMethodImpl_OpenJDK7 class methodsFor:'native - sun.misc'!

_sun_misc_Perf_attach: this _: a1 _: a2 _: a3

    <javanative: 'sun/misc/Perf' name: 'attach(Ljava/lang/String;II)Ljava/nio/ByteBuffer;'>

    ^ JavaVM unimplementedNativeMethodSignal raise
!

_sun_misc_Perf_createByteArray: this _: a1 _: a2 _: a3 _: a4 _: a5

    <javanative: 'sun/misc/Perf' name: 'createByteArray(Ljava/lang/String;II[BI)Ljava/nio/ByteBuffer;'>

    ^ JavaVM unimplementedNativeMethodSignal raise
!

_sun_misc_Perf_createLong: this _: a1 _: a2 _: a3 _: a4 _: a5

    <javanative: 'sun/misc/Perf' name: 'createLong(Ljava/lang/String;IIJ)Ljava/nio/ByteBuffer;'>

    | memory |

    memory := JavaVM performance counters at: (Java as_ST_String: a1) ifAbsentPut:[ ByteArray new: 8].
    ^JAVA java nio HeapByteBuffer new: memory with: 0 with: 8.

    "Modified: / 20-02-2013 / 00:13:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_sun_misc_Perf_detach: this _: a1

    <javanative: 'sun/misc/Perf' name: 'detach(Ljava/nio/ByteBuffer;)V'>

    ^ JavaVM unimplementedNativeMethodSignal raise
!

_sun_misc_Perf_highResCounter: this

    <javanative: 'sun/misc/Perf' name: 'highResCounter()J'>

    ^ JavaVM unimplementedNativeMethodSignal raise
!

_sun_misc_Perf_highResFrequency: this

    <javanative: 'sun/misc/Perf' name: 'highResFrequency()J'>

    ^ JavaVM unimplementedNativeMethodSignal raise
!

_sun_misc_Perf_registerNatives: this

    <javanative: 'sun/misc/Perf' name: 'registerNatives()V'>

    "Nothing to do here"

    "Modified: / 11-02-2013 / 02:53:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_sun_misc_Unsafe_copyMemory: this _: a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _: a8

    <javanative: 'sun/misc/Unsafe' name: 'copyMemory(Ljava/lang/Object;JLjava/lang/Object;JJ)V'>

    ^ JavaVM unimplementedNativeMethodSignal raise
!

_sun_misc_Unsafe_defineAnonymousClass: this _: a1 _: a2 _: a3

    <javanative: 'sun/misc/Unsafe' name: 'defineAnonymousClass(Ljava/lang/Class;[B[Ljava/lang/Object;)Ljava/lang/Class;'>

    ^ JavaVM unimplementedNativeMethodSignal raise
!

_sun_misc_Unsafe_setMemory: this _: a1 _: a2 _: a3 _: a4 _: a5 _: a6

    <javanative: 'sun/misc/Unsafe' name: 'setMemory(Ljava/lang/Object;JJB)V'>

    ^ JavaVM unimplementedNativeMethodSignal raise
! !

!JavaNativeMethodImpl_OpenJDK7 class methodsFor:'native - sun.reflect'!

_sun_reflect_Reflection_getCallerClass0: this _: a1

    <javanative: 'sun/reflect/Reflection' name: 'getCallerClass0(I)Ljava/lang/Class;'>

    "/ Until there is hotspot @CallerSensitive support,
    "/ depth must always be 2 to get the immediate caller
    ^ self _sun_reflect_Reflection_getCallerClass: this _: 2

    "Modified (comment): / 11-11-2013 / 21:18:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

_sun_reflect_Reflection_getCallerClass: this

    <javanative: 'sun/reflect/Reflection' name: 'getCallerClass()Ljava/lang/Class;'>

    "/ Until there is hotspot @CallerSensitive support,
    "/ depth must always be 2 to get the immediate caller
    ^ self _sun_reflect_Reflection_getCallerClass0: this _: 2

    "Modified (comment): / 11-11-2013 / 21:18:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!JavaNativeMethodImpl_OpenJDK7 class methodsFor:'documentation'!

version_CVS
    ^ '$Header: /cvs/stx/stx/libjava/JavaNativeMethodImpl_OpenJDK7.st,v 1.3 2013-09-06 00:41:25 vrany Exp $'
!

version_HG

    ^ '$Changeset: <not expanded> $'
! !