1 /*
2  * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
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
7  * published by the Free Software Foundation.  Oracle designates this
8  * particular file as subject to the "Classpath" exception as provided
9  * by Oracle in the LICENSE file that accompanied this code.
10  *
11  * This code is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14  * version 2 for more details (a copy is included in the LICENSE file that
15  * accompanied this code).
16  *
17  * You should have received a copy of the GNU General Public License version
18  * 2 along with this work; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20  *
21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22  * or visit www.oracle.com if you need additional information or have any
23  * questions.
24  */
25 
26 package sun.misc;
27 
28 @SuppressWarnings({"unchecked", "deprecation", "all"})
29 public class VM {
30 
VM()31     public VM() {
32         throw new RuntimeException("Stub!");
33     }
34 
35     @Deprecated
threadsSuspended()36     public static boolean threadsSuspended() {
37         throw new RuntimeException("Stub!");
38     }
39 
allowThreadSuspension(java.lang.ThreadGroup g, boolean b)40     public static boolean allowThreadSuspension(java.lang.ThreadGroup g, boolean b) {
41         throw new RuntimeException("Stub!");
42     }
43 
44     @Deprecated
suspendThreads()45     public static boolean suspendThreads() {
46         throw new RuntimeException("Stub!");
47     }
48 
49     @Deprecated
unsuspendThreads()50     public static void unsuspendThreads() {
51         throw new RuntimeException("Stub!");
52     }
53 
54     @Deprecated
unsuspendSomeThreads()55     public static void unsuspendSomeThreads() {
56         throw new RuntimeException("Stub!");
57     }
58 
59     @Deprecated
getState()60     public static final int getState() {
61         throw new RuntimeException("Stub!");
62     }
63 
64     @Deprecated
asChange(int as_old, int as_new)65     public static void asChange(int as_old, int as_new) {
66         throw new RuntimeException("Stub!");
67     }
68 
69     @Deprecated
asChange_otherthread(int as_old, int as_new)70     public static void asChange_otherthread(int as_old, int as_new) {
71         throw new RuntimeException("Stub!");
72     }
73 
booted()74     public static void booted() {
75         throw new RuntimeException("Stub!");
76     }
77 
isBooted()78     public static boolean isBooted() {
79         throw new RuntimeException("Stub!");
80     }
81 
awaitBooted()82     public static void awaitBooted() throws java.lang.InterruptedException {
83         throw new RuntimeException("Stub!");
84     }
85 
86     @android.compat.annotation.UnsupportedAppUsage
maxDirectMemory()87     public static long maxDirectMemory() {
88         throw new RuntimeException("Stub!");
89     }
90 
isDirectMemoryPageAligned()91     public static boolean isDirectMemoryPageAligned() {
92         throw new RuntimeException("Stub!");
93     }
94 
allowArraySyntax()95     public static boolean allowArraySyntax() {
96         throw new RuntimeException("Stub!");
97     }
98 
getSavedProperty(java.lang.String key)99     public static java.lang.String getSavedProperty(java.lang.String key) {
100         throw new RuntimeException("Stub!");
101     }
102 
saveAndRemoveProperties(java.util.Properties props)103     public static void saveAndRemoveProperties(java.util.Properties props) {
104         throw new RuntimeException("Stub!");
105     }
106 
initializeOSEnvironment()107     public static void initializeOSEnvironment() {
108         throw new RuntimeException("Stub!");
109     }
110 
getFinalRefCount()111     public static int getFinalRefCount() {
112         throw new RuntimeException("Stub!");
113     }
114 
getPeakFinalRefCount()115     public static int getPeakFinalRefCount() {
116         throw new RuntimeException("Stub!");
117     }
118 
addFinalRefCount(int n)119     public static void addFinalRefCount(int n) {
120         throw new RuntimeException("Stub!");
121     }
122 
toThreadState(int threadStatus)123     public static java.lang.Thread.State toThreadState(int threadStatus) {
124         throw new RuntimeException("Stub!");
125     }
126 
127     private static final int JVMTI_THREAD_STATE_ALIVE = 1; // 0x1
128 
129     private static final int JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 1024; // 0x400
130 
131     private static final int JVMTI_THREAD_STATE_RUNNABLE = 4; // 0x4
132 
133     private static final int JVMTI_THREAD_STATE_TERMINATED = 2; // 0x2
134 
135     private static final int JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 16; // 0x10
136 
137     private static final int JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 32; // 0x20
138 
139     @Deprecated public static final int STATE_GREEN = 1; // 0x1
140 
141     @Deprecated public static final int STATE_RED = 3; // 0x3
142 
143     @Deprecated public static final int STATE_YELLOW = 2; // 0x2
144 
145     private static boolean allowArraySyntax;
146 
147     private static volatile boolean booted = false;
148 
149     private static boolean defaultAllowArraySyntax = false;
150 
151     private static long directMemory = 67108864; // 0x4000000
152 
153     private static volatile int finalRefCount = 0; // 0x0
154 
155     private static final java.lang.Object lock;
156 
157     static {
158         lock = null;
159     }
160 
161     private static boolean pageAlignDirectMemory;
162 
163     private static volatile int peakFinalRefCount = 0; // 0x0
164 
165     private static final java.util.Properties savedProps;
166 
167     static {
168         savedProps = null;
169     }
170 
171     private static boolean suspended = false;
172 }
173