src/share/classes/java/lang/System.java

Print this page
rev 6519 : 8006627: Performance improvements to UUID(String) and UUID.toString()
Contributed-by: Steven Schlansker <stevenschlansker@gmail.com>


1201             }
1202             public byte[] getRawExecutableTypeAnnotations(Executable executable) {
1203                 return Class.getExecutableTypeAnnotationBytes(executable);
1204             }
1205             public <E extends Enum<E>>
1206                     E[] getEnumConstantsShared(Class<E> klass) {
1207                 return klass.getEnumConstantsShared();
1208             }
1209             public void blockedOn(Thread t, Interruptible b) {
1210                 t.blockedOn(b);
1211             }
1212             public void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook) {
1213                 Shutdown.add(slot, registerShutdownInProgress, hook);
1214             }
1215             public int getStackTraceDepth(Throwable t) {
1216                 return t.getStackTraceDepth();
1217             }
1218             public StackTraceElement getStackTraceElement(Throwable t, int i) {
1219                 return t.getStackTraceElement(i);
1220             }






1221         });
1222     }
1223 
1224     /* returns the class of the caller. */
1225     static Class<?> getCallerClass() {
1226         // NOTE use of more generic Reflection.getCallerClass()
1227         return Reflection.getCallerClass(3);
1228     }
1229 }


1201             }
1202             public byte[] getRawExecutableTypeAnnotations(Executable executable) {
1203                 return Class.getExecutableTypeAnnotationBytes(executable);
1204             }
1205             public <E extends Enum<E>>
1206                     E[] getEnumConstantsShared(Class<E> klass) {
1207                 return klass.getEnumConstantsShared();
1208             }
1209             public void blockedOn(Thread t, Interruptible b) {
1210                 t.blockedOn(b);
1211             }
1212             public void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook) {
1213                 Shutdown.add(slot, registerShutdownInProgress, hook);
1214             }
1215             public int getStackTraceDepth(Throwable t) {
1216                 return t.getStackTraceDepth();
1217             }
1218             public StackTraceElement getStackTraceElement(Throwable t, int i) {
1219                 return t.getStackTraceElement(i);
1220             }
1221             public String createStringSharedChars(char[] chars) {
1222                 return new String(chars, true);
1223             }
1224             public int formatUnsignedLong(long val, int shift, char[] buf, int offset, int len) {
1225                 return Long.formatUnsignedLong(val, shift, buf, offset, len);
1226             }
1227         });
1228     }
1229 
1230     /* returns the class of the caller. */
1231     static Class<?> getCallerClass() {
1232         // NOTE use of more generic Reflection.getCallerClass()
1233         return Reflection.getCallerClass(3);
1234     }
1235 }