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

Print this page
rev 5028 : 7126277: alternative hashing


1179             }
1180             public AnnotationType getAnnotationType(Class klass) {
1181                 return klass.getAnnotationType();
1182             }
1183             public <E extends Enum<E>>
1184                     E[] getEnumConstantsShared(Class<E> klass) {
1185                 return klass.getEnumConstantsShared();
1186             }
1187             public void blockedOn(Thread t, Interruptible b) {
1188                 t.blockedOn(b);
1189             }
1190             public void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook) {
1191                 Shutdown.add(slot, registerShutdownInProgress, hook);
1192             }
1193             public int getStackTraceDepth(Throwable t) {
1194                 return t.getStackTraceDepth();
1195             }
1196             public StackTraceElement getStackTraceElement(Throwable t, int i) {
1197                 return t.getStackTraceElement(i);
1198             }



1199         });
1200     }
1201 
1202     /* returns the class of the caller. */
1203     static Class<?> getCallerClass() {
1204         // NOTE use of more generic Reflection.getCallerClass()
1205         return Reflection.getCallerClass(3);
1206     }
1207 }


1179             }
1180             public AnnotationType getAnnotationType(Class klass) {
1181                 return klass.getAnnotationType();
1182             }
1183             public <E extends Enum<E>>
1184                     E[] getEnumConstantsShared(Class<E> klass) {
1185                 return klass.getEnumConstantsShared();
1186             }
1187             public void blockedOn(Thread t, Interruptible b) {
1188                 t.blockedOn(b);
1189             }
1190             public void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook) {
1191                 Shutdown.add(slot, registerShutdownInProgress, hook);
1192             }
1193             public int getStackTraceDepth(Throwable t) {
1194                 return t.getStackTraceDepth();
1195             }
1196             public StackTraceElement getStackTraceElement(Throwable t, int i) {
1197                 return t.getStackTraceElement(i);
1198             }
1199             public int getStringHash32(String string) {
1200                 return string.hash32();
1201             }
1202         });
1203     }
1204 
1205     /* returns the class of the caller. */
1206     static Class<?> getCallerClass() {
1207         // NOTE use of more generic Reflection.getCallerClass()
1208         return Reflection.getCallerClass(3);
1209     }
1210 }