1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved. 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 * 6 * This code is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 only, as 8 * published by the Free Software Foundation. Oracle designates this 9 * particular file as subject to the "Classpath" exception as provided 10 * by Oracle in the LICENSE file that accompanied this code. 11 * 12 * This code is distributed in the hope that it will be useful, but WITHOUT 13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 * version 2 for more details (a copy is included in the LICENSE file that 16 * accompanied this code). 17 * 18 * You should have received a copy of the GNU General Public License version 19 * 2 along with this work; if not, write to the Free Software Foundation, 20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 21 * 22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 23 * or visit www.oracle.com if you need additional information or have any 24 * questions. 25 */ 26 27 package java.lang; 28 29 import dalvik.annotation.compat.UnsupportedAppUsage; 30 31 @SuppressWarnings({"unchecked", "deprecation", "all"}) 32 public final class System { 33 34 @UnsupportedAppUsage System()35 private System() { 36 throw new RuntimeException("Stub!"); 37 } 38 setIn(java.io.InputStream in)39 public static void setIn(java.io.InputStream in) { 40 throw new RuntimeException("Stub!"); 41 } 42 setOut(java.io.PrintStream out)43 public static void setOut(java.io.PrintStream out) { 44 throw new RuntimeException("Stub!"); 45 } 46 setErr(java.io.PrintStream err)47 public static void setErr(java.io.PrintStream err) { 48 throw new RuntimeException("Stub!"); 49 } 50 console()51 public static java.io.Console console() { 52 throw new RuntimeException("Stub!"); 53 } 54 inheritedChannel()55 public static java.nio.channels.Channel inheritedChannel() throws java.io.IOException { 56 throw new RuntimeException("Stub!"); 57 } 58 setIn0(java.io.InputStream in)59 private static native void setIn0(java.io.InputStream in); 60 setOut0(java.io.PrintStream out)61 private static native void setOut0(java.io.PrintStream out); 62 setErr0(java.io.PrintStream err)63 private static native void setErr0(java.io.PrintStream err); 64 setSecurityManager(java.lang.SecurityManager s)65 public static void setSecurityManager(java.lang.SecurityManager s) { 66 throw new RuntimeException("Stub!"); 67 } 68 getSecurityManager()69 public static java.lang.SecurityManager getSecurityManager() { 70 throw new RuntimeException("Stub!"); 71 } 72 currentTimeMillis()73 public static native long currentTimeMillis(); 74 nanoTime()75 public static native long nanoTime(); 76 arraycopy( java.lang.Object src, int srcPos, java.lang.Object dest, int destPos, int length)77 public static native void arraycopy( 78 java.lang.Object src, int srcPos, java.lang.Object dest, int destPos, int length); 79 80 @UnsupportedAppUsage arraycopy(char[] src, int srcPos, char[] dst, int dstPos, int length)81 private static void arraycopy(char[] src, int srcPos, char[] dst, int dstPos, int length) { 82 throw new RuntimeException("Stub!"); 83 } 84 arraycopyCharUnchecked( char[] src, int srcPos, char[] dst, int dstPos, int length)85 private static native void arraycopyCharUnchecked( 86 char[] src, int srcPos, char[] dst, int dstPos, int length); 87 88 @UnsupportedAppUsage arraycopy(byte[] src, int srcPos, byte[] dst, int dstPos, int length)89 public static void arraycopy(byte[] src, int srcPos, byte[] dst, int dstPos, int length) { 90 throw new RuntimeException("Stub!"); 91 } 92 arraycopyByteUnchecked( byte[] src, int srcPos, byte[] dst, int dstPos, int length)93 private static native void arraycopyByteUnchecked( 94 byte[] src, int srcPos, byte[] dst, int dstPos, int length); 95 96 @UnsupportedAppUsage arraycopy(short[] src, int srcPos, short[] dst, int dstPos, int length)97 private static void arraycopy(short[] src, int srcPos, short[] dst, int dstPos, int length) { 98 throw new RuntimeException("Stub!"); 99 } 100 arraycopyShortUnchecked( short[] src, int srcPos, short[] dst, int dstPos, int length)101 private static native void arraycopyShortUnchecked( 102 short[] src, int srcPos, short[] dst, int dstPos, int length); 103 104 @UnsupportedAppUsage arraycopy(int[] src, int srcPos, int[] dst, int dstPos, int length)105 private static void arraycopy(int[] src, int srcPos, int[] dst, int dstPos, int length) { 106 throw new RuntimeException("Stub!"); 107 } 108 arraycopyIntUnchecked( int[] src, int srcPos, int[] dst, int dstPos, int length)109 private static native void arraycopyIntUnchecked( 110 int[] src, int srcPos, int[] dst, int dstPos, int length); 111 112 @UnsupportedAppUsage arraycopy(long[] src, int srcPos, long[] dst, int dstPos, int length)113 private static void arraycopy(long[] src, int srcPos, long[] dst, int dstPos, int length) { 114 throw new RuntimeException("Stub!"); 115 } 116 arraycopyLongUnchecked( long[] src, int srcPos, long[] dst, int dstPos, int length)117 private static native void arraycopyLongUnchecked( 118 long[] src, int srcPos, long[] dst, int dstPos, int length); 119 120 @UnsupportedAppUsage arraycopy(float[] src, int srcPos, float[] dst, int dstPos, int length)121 private static void arraycopy(float[] src, int srcPos, float[] dst, int dstPos, int length) { 122 throw new RuntimeException("Stub!"); 123 } 124 arraycopyFloatUnchecked( float[] src, int srcPos, float[] dst, int dstPos, int length)125 private static native void arraycopyFloatUnchecked( 126 float[] src, int srcPos, float[] dst, int dstPos, int length); 127 arraycopy(double[] src, int srcPos, double[] dst, int dstPos, int length)128 private static void arraycopy(double[] src, int srcPos, double[] dst, int dstPos, int length) { 129 throw new RuntimeException("Stub!"); 130 } 131 arraycopyDoubleUnchecked( double[] src, int srcPos, double[] dst, int dstPos, int length)132 private static native void arraycopyDoubleUnchecked( 133 double[] src, int srcPos, double[] dst, int dstPos, int length); 134 135 @UnsupportedAppUsage arraycopy( boolean[] src, int srcPos, boolean[] dst, int dstPos, int length)136 private static void arraycopy( 137 boolean[] src, int srcPos, boolean[] dst, int dstPos, int length) { 138 throw new RuntimeException("Stub!"); 139 } 140 arraycopyBooleanUnchecked( boolean[] src, int srcPos, boolean[] dst, int dstPos, int length)141 private static native void arraycopyBooleanUnchecked( 142 boolean[] src, int srcPos, boolean[] dst, int dstPos, int length); 143 identityHashCode(java.lang.Object x)144 public static int identityHashCode(java.lang.Object x) { 145 throw new RuntimeException("Stub!"); 146 } 147 specialProperties()148 private static native java.lang.String[] specialProperties(); 149 parsePropertyAssignments( java.util.Properties p, java.lang.String[] assignments)150 private static void parsePropertyAssignments( 151 java.util.Properties p, java.lang.String[] assignments) { 152 throw new RuntimeException("Stub!"); 153 } 154 initUnchangeableSystemProperties()155 private static java.util.Properties initUnchangeableSystemProperties() { 156 throw new RuntimeException("Stub!"); 157 } 158 initProperties()159 private static java.util.Properties initProperties() { 160 throw new RuntimeException("Stub!"); 161 } 162 setDefaultChangeableProperties(java.util.Properties p)163 private static java.util.Properties setDefaultChangeableProperties(java.util.Properties p) { 164 throw new RuntimeException("Stub!"); 165 } 166 setUnchangeableSystemProperty(java.lang.String key, java.lang.String value)167 public static void setUnchangeableSystemProperty(java.lang.String key, java.lang.String value) { 168 throw new RuntimeException("Stub!"); 169 } 170 addLegacyLocaleSystemProperties()171 private static void addLegacyLocaleSystemProperties() { 172 throw new RuntimeException("Stub!"); 173 } 174 getProperties()175 public static java.util.Properties getProperties() { 176 throw new RuntimeException("Stub!"); 177 } 178 lineSeparator()179 public static java.lang.String lineSeparator() { 180 throw new RuntimeException("Stub!"); 181 } 182 setProperties(java.util.Properties props)183 public static void setProperties(java.util.Properties props) { 184 throw new RuntimeException("Stub!"); 185 } 186 getProperty(java.lang.String key)187 public static java.lang.String getProperty(java.lang.String key) { 188 throw new RuntimeException("Stub!"); 189 } 190 getProperty(java.lang.String key, java.lang.String def)191 public static java.lang.String getProperty(java.lang.String key, java.lang.String def) { 192 throw new RuntimeException("Stub!"); 193 } 194 setProperty(java.lang.String key, java.lang.String value)195 public static java.lang.String setProperty(java.lang.String key, java.lang.String value) { 196 throw new RuntimeException("Stub!"); 197 } 198 clearProperty(java.lang.String key)199 public static java.lang.String clearProperty(java.lang.String key) { 200 throw new RuntimeException("Stub!"); 201 } 202 checkKey(java.lang.String key)203 private static void checkKey(java.lang.String key) { 204 throw new RuntimeException("Stub!"); 205 } 206 getenv(java.lang.String name)207 public static java.lang.String getenv(java.lang.String name) { 208 throw new RuntimeException("Stub!"); 209 } 210 getenv()211 public static java.util.Map<java.lang.String, java.lang.String> getenv() { 212 throw new RuntimeException("Stub!"); 213 } 214 exit(int status)215 public static void exit(int status) { 216 throw new RuntimeException("Stub!"); 217 } 218 gc()219 public static void gc() { 220 throw new RuntimeException("Stub!"); 221 } 222 runFinalization()223 public static void runFinalization() { 224 throw new RuntimeException("Stub!"); 225 } 226 227 @Deprecated runFinalizersOnExit(boolean value)228 public static void runFinalizersOnExit(boolean value) { 229 throw new RuntimeException("Stub!"); 230 } 231 load(java.lang.String filename)232 public static void load(java.lang.String filename) { 233 throw new RuntimeException("Stub!"); 234 } 235 loadLibrary(java.lang.String libname)236 public static void loadLibrary(java.lang.String libname) { 237 throw new RuntimeException("Stub!"); 238 } 239 mapLibraryName(java.lang.String libname)240 public static native java.lang.String mapLibraryName(java.lang.String libname); 241 newPrintStream( java.io.FileOutputStream fos, java.lang.String enc)242 private static java.io.PrintStream newPrintStream( 243 java.io.FileOutputStream fos, java.lang.String enc) { 244 throw new RuntimeException("Stub!"); 245 } 246 247 @UnsupportedAppUsage logE(java.lang.String message)248 public static void logE(java.lang.String message) { 249 throw new RuntimeException("Stub!"); 250 } 251 252 @UnsupportedAppUsage logE(java.lang.String message, java.lang.Throwable th)253 public static void logE(java.lang.String message, java.lang.Throwable th) { 254 throw new RuntimeException("Stub!"); 255 } 256 logI(java.lang.String message)257 public static void logI(java.lang.String message) { 258 throw new RuntimeException("Stub!"); 259 } 260 logI(java.lang.String message, java.lang.Throwable th)261 public static void logI(java.lang.String message, java.lang.Throwable th) { 262 throw new RuntimeException("Stub!"); 263 } 264 logW(java.lang.String message)265 public static void logW(java.lang.String message) { 266 throw new RuntimeException("Stub!"); 267 } 268 269 @UnsupportedAppUsage logW(java.lang.String message, java.lang.Throwable th)270 public static void logW(java.lang.String message, java.lang.Throwable th) { 271 throw new RuntimeException("Stub!"); 272 } 273 274 @UnsupportedAppUsage log(char type, java.lang.String message, java.lang.Throwable th)275 private static native void log(char type, java.lang.String message, java.lang.Throwable th); 276 277 private static final int ARRAYCOPY_SHORT_BOOLEAN_ARRAY_THRESHOLD = 32; // 0x20 278 279 private static final int ARRAYCOPY_SHORT_BYTE_ARRAY_THRESHOLD = 32; // 0x20 280 281 private static final int ARRAYCOPY_SHORT_CHAR_ARRAY_THRESHOLD = 32; // 0x20 282 283 private static final int ARRAYCOPY_SHORT_DOUBLE_ARRAY_THRESHOLD = 32; // 0x20 284 285 private static final int ARRAYCOPY_SHORT_FLOAT_ARRAY_THRESHOLD = 32; // 0x20 286 287 private static final int ARRAYCOPY_SHORT_INT_ARRAY_THRESHOLD = 32; // 0x20 288 289 private static final int ARRAYCOPY_SHORT_LONG_ARRAY_THRESHOLD = 32; // 0x20 290 291 private static final int ARRAYCOPY_SHORT_SHORT_ARRAY_THRESHOLD = 32; // 0x20 292 293 private static final java.lang.Object LOCK; 294 295 static { 296 LOCK = null; 297 } 298 299 private static volatile java.io.Console cons; 300 301 public static final java.io.PrintStream err; 302 303 static { 304 err = null; 305 } 306 307 public static final java.io.InputStream in; 308 309 static { 310 in = null; 311 } 312 313 private static boolean justRanFinalization; 314 315 private static java.lang.String lineSeparator; 316 317 public static final java.io.PrintStream out; 318 319 static { 320 out = null; 321 } 322 323 private static java.util.Properties props; 324 325 private static boolean runGC; 326 327 private static java.util.Properties unchangeableProps; 328 329 @SuppressWarnings({"unchecked", "deprecation", "all"}) 330 static final class PropertiesWithNonOverrideableDefaults extends java.util.Properties { 331 PropertiesWithNonOverrideableDefaults(java.util.Properties defaults)332 PropertiesWithNonOverrideableDefaults(java.util.Properties defaults) { 333 throw new RuntimeException("Stub!"); 334 } 335 put(java.lang.Object key, java.lang.Object value)336 public java.lang.Object put(java.lang.Object key, java.lang.Object value) { 337 throw new RuntimeException("Stub!"); 338 } 339 remove(java.lang.Object key)340 public java.lang.Object remove(java.lang.Object key) { 341 throw new RuntimeException("Stub!"); 342 } 343 } 344 } 345