Author: mturk Date: Fri Jun 19 06:52:16 2009 New Revision: 786393 URL: http://svn.apache.org/viewvc?rev=786393&view=rev Log: Make native methods private not public
Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ExecutableMemory.java commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Memory.java Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ExecutableMemory.java URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ExecutableMemory.java?rev=786393&r1=786392&r2=786393&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ExecutableMemory.java (original) +++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/ExecutableMemory.java Fri Jun 19 06:52:16 2009 @@ -33,7 +33,7 @@ } - public static native Pointer malloc0(long size) + private static native Pointer malloc0(long size) throws OutOfMemoryError; /** * Allocates {...@code size} bytes and returns a {...@link Pointer} @@ -54,7 +54,7 @@ return malloc0(size); } - public static native Pointer exec0(Pointer src); + private static native Pointer exec0(Pointer src); /** * Returns the executable {...@code page} bytes of previously allocated * executable memory and returns a {...@link Pointer}, @@ -63,7 +63,7 @@ * * @throws NullPointerException if {...@code src} is {...@code null}. */ - public static Pointer getExecutablePage(Pointer src) + protected static Pointer getExecutablePage(Pointer src) throws NullPointerException { if (src == null || src.IsNull()) Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Memory.java URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Memory.java?rev=786393&r1=786392&r2=786393&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Memory.java (original) +++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Memory.java Fri Jun 19 06:52:16 2009 @@ -120,7 +120,7 @@ public static native Pointer calloc(long size) throws OutOfMemoryError, IllegalArgumentException; - public static native void realloc0(Pointer ptr, long size) + private static native void realloc0(Pointer ptr, long size) throws OutOfMemoryError; /** * Change the size of memory block pointed by {...@code ptr}. @@ -140,7 +140,7 @@ realloc0(ptr, size); } - public static native Pointer slice0(Pointer src, long offset, long size) + private static native Pointer slice0(Pointer src, long offset, long size) throws IndexOutOfBoundsException; /** * Creates a new {...@link Pointer} object whose content is a shared @@ -169,7 +169,7 @@ return slice0(src, offset, size); } - public static native Pointer dup0(Pointer src, long offset, long size) + private static native Pointer dup0(Pointer src, long offset, long size) throws IndexOutOfBoundsException, OutOfMemoryError, RuntimeException; /** @@ -201,8 +201,8 @@ return dup0(src, offset, size); } - public static native void copy0(Pointer src, long srcPos, Pointer dst, - long dstPos, long length) + private static native void copy0(Pointer src, long srcPos, Pointer dst, + long dstPos, long length) throws IndexOutOfBoundsException, IllegalArgumentException, RuntimeException; /** @@ -245,8 +245,8 @@ copy0(src, srcPos, dst, dstPos, length); } - public static native void move0(Pointer src, long srcPos, Pointer dst, - long dstPos, long length) + private static native void move0(Pointer src, long srcPos, Pointer dst, + long dstPos, long length) throws IndexOutOfBoundsException, IllegalArgumentException, RuntimeException; /** @@ -288,7 +288,7 @@ move0(src, srcPos, dst, dstPos, length); } - public static native void clear0(Pointer ptr, long offset, long length) + private static native void clear0(Pointer ptr, long offset, long length) throws IndexOutOfBoundsException, RuntimeException; /** * Set the {...@code ptr} memory area from {...@code src} to {...@code zero}. @@ -317,7 +317,7 @@ clear0(ptr, offset, length); } - public static native void set0(Pointer ptr, long offset, long length, int val) + private static native void set0(Pointer ptr, long offset, long length, int val) throws IndexOutOfBoundsException, RuntimeException; /** * Set the {...@code ptr} memory area from {...@code src} to {...@code val}.