blob: 2121adf909be1713bafa851acc036445c75dcbc0 [file] [log] [blame]
Elliott Hughes2faa5f12012-01-30 14:42:07 -08001/*
2 * Copyright (C) 2011 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Brian Carlstrom9f30b382011-08-28 22:41:38 -070016
Elliott Hughesb264f082012-04-06 17:10:10 -070017class MyClassNatives {
Elliott Hughesa2501992011-08-26 19:39:54 -070018 native void throwException();
Brian Carlstrom9f30b382011-08-28 22:41:38 -070019 native void foo();
Shih-wei Liao31384c52011-09-06 15:27:45 -070020 native int bar(int count);
Ian Rogers1cefdbd2012-02-29 09:34:50 -080021 static native int sbar(int count);
Brian Carlstrom9f30b382011-08-28 22:41:38 -070022 native int fooI(int x);
23 native int fooII(int x, int y);
Ian Rogers9b269d22011-09-04 14:06:05 -070024 native long fooJJ(long x, long y);
25 native Object fooO(Object x);
Brian Carlstrom9f30b382011-08-28 22:41:38 -070026 native double fooDD(double x, double y);
Elliott Hughes3e778f72012-05-21 15:29:52 -070027 synchronized native long fooJJ_synchronized(long x, long y);
Brian Carlstrom9f30b382011-08-28 22:41:38 -070028 native Object fooIOO(int x, Object y, Object z);
29 static native Object fooSIOO(int x, Object y, Object z);
Shih-wei Liao82da44b2011-09-01 00:38:04 -070030 static native int fooSII(int x, int y);
Ian Rogers7a99c112011-09-07 12:48:27 -070031 static native double fooSDD(double x, double y);
Brian Carlstrom9f30b382011-08-28 22:41:38 -070032 static synchronized native Object fooSSIOO(int x, Object y, Object z);
Ian Rogersb9231c82011-09-05 22:13:19 -070033 static native void arraycopy(Object src, int src_pos, Object dst, int dst_pos, int length);
Ian Rogers67375ac2011-09-14 00:55:44 -070034 native boolean compareAndSwapInt(Object obj, long offset, int expected, int newval);
Ian Rogersc7792842012-03-03 15:36:20 -080035 static native int getText(long val1, Object obj1, long val2, Object obj2);
Elliott Hughesb264f082012-04-06 17:10:10 -070036
37 native Class instanceMethodThatShouldReturnClass();
38 static native Class staticMethodThatShouldReturnClass();
39
40 native void instanceMethodThatShouldTakeClass(int i, Class c);
41 static native void staticMethodThatShouldTakeClass(int i, Class c);
Elliott Hughes3e778f72012-05-21 15:29:52 -070042}