Elliott Hughes | 2faa5f1 | 2012-01-30 14:42:07 -0800 | [diff] [blame] | 1 | /* |
| 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 Carlstrom | 9f30b38 | 2011-08-28 22:41:38 -0700 | [diff] [blame] | 16 | |
| 17 | class MyClass { |
Elliott Hughes | a250199 | 2011-08-26 19:39:54 -0700 | [diff] [blame] | 18 | native void throwException(); |
Brian Carlstrom | 9f30b38 | 2011-08-28 22:41:38 -0700 | [diff] [blame] | 19 | native void foo(); |
Shih-wei Liao | 31384c5 | 2011-09-06 15:27:45 -0700 | [diff] [blame] | 20 | native int bar(int count); |
Ian Rogers | 1cefdbd | 2012-02-29 09:34:50 -0800 | [diff] [blame^] | 21 | static native int sbar(int count); |
Brian Carlstrom | 9f30b38 | 2011-08-28 22:41:38 -0700 | [diff] [blame] | 22 | native int fooI(int x); |
| 23 | native int fooII(int x, int y); |
Ian Rogers | 9b269d2 | 2011-09-04 14:06:05 -0700 | [diff] [blame] | 24 | native long fooJJ(long x, long y); |
| 25 | native Object fooO(Object x); |
Brian Carlstrom | 9f30b38 | 2011-08-28 22:41:38 -0700 | [diff] [blame] | 26 | native double fooDD(double x, double y); |
| 27 | native Object fooIOO(int x, Object y, Object z); |
| 28 | static native Object fooSIOO(int x, Object y, Object z); |
Shih-wei Liao | 82da44b | 2011-09-01 00:38:04 -0700 | [diff] [blame] | 29 | static native int fooSII(int x, int y); |
Ian Rogers | 7a99c11 | 2011-09-07 12:48:27 -0700 | [diff] [blame] | 30 | static native double fooSDD(double x, double y); |
Brian Carlstrom | 9f30b38 | 2011-08-28 22:41:38 -0700 | [diff] [blame] | 31 | static synchronized native Object fooSSIOO(int x, Object y, Object z); |
Ian Rogers | b9231c8 | 2011-09-05 22:13:19 -0700 | [diff] [blame] | 32 | static native void arraycopy(Object src, int src_pos, Object dst, int dst_pos, int length); |
Ian Rogers | 67375ac | 2011-09-14 00:55:44 -0700 | [diff] [blame] | 33 | native boolean compareAndSwapInt(Object obj, long offset, int expected, int newval); |
Brian Carlstrom | 9f30b38 | 2011-08-28 22:41:38 -0700 | [diff] [blame] | 34 | } |