equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
843 /** Allocate an instance but do not run any constructor. |
843 /** Allocate an instance but do not run any constructor. |
844 Initializes the class if it has not yet been. */ |
844 Initializes the class if it has not yet been. */ |
845 public native Object allocateInstance(Class<?> cls) |
845 public native Object allocateInstance(Class<?> cls) |
846 throws InstantiationException; |
846 throws InstantiationException; |
847 |
847 |
848 /** Lock the object. It must get unlocked via {@link #monitorExit}. */ |
|
849 public native void monitorEnter(Object o); |
|
850 |
|
851 /** |
|
852 * Unlock the object. It must have been locked via {@link |
|
853 * #monitorEnter}. |
|
854 */ |
|
855 public native void monitorExit(Object o); |
|
856 |
|
857 /** |
|
858 * Tries to lock the object. Returns true or false to indicate |
|
859 * whether the lock succeeded. If it did, the object must be |
|
860 * unlocked via {@link #monitorExit}. |
|
861 */ |
|
862 public native boolean tryMonitorEnter(Object o); |
|
863 |
|
864 /** Throw the exception without telling the verifier. */ |
848 /** Throw the exception without telling the verifier. */ |
865 public native void throwException(Throwable ee); |
849 public native void throwException(Throwable ee); |
866 |
850 |
867 |
851 |
868 /** |
852 /** |