1249 public static int enumerate(Thread tarray[]) { |
1249 public static int enumerate(Thread tarray[]) { |
1250 return currentThread().getThreadGroup().enumerate(tarray); |
1250 return currentThread().getThreadGroup().enumerate(tarray); |
1251 } |
1251 } |
1252 |
1252 |
1253 /** |
1253 /** |
1254 * Counts the number of stack frames in this thread. The thread must |
1254 * Throws {@code UnsupportedOperationException}. |
1255 * be suspended. |
1255 * |
1256 * |
1256 * @return nothing |
1257 * @return the number of stack frames in this thread. |
1257 * |
1258 * @throws IllegalThreadStateException if this thread is not |
1258 * @deprecated This method was originally designed to count the number of |
1259 * suspended. |
1259 * stack frames but the results were never well-defined and it |
1260 * @deprecated The definition of this call depends on {@link #suspend}, |
1260 * depended on thread-suspension. |
1261 * which is deprecated. Further, the results of this call |
|
1262 * were never well-defined. |
|
1263 * This method is subject to removal in a future version of Java SE. |
1261 * This method is subject to removal in a future version of Java SE. |
1264 * @see StackWalker |
1262 * @see StackWalker |
1265 */ |
1263 */ |
1266 @Deprecated(since="1.2", forRemoval=true) |
1264 @Deprecated(since="1.2", forRemoval=true) |
1267 public native int countStackFrames(); |
1265 public int countStackFrames() { |
|
1266 throw new UnsupportedOperationException(); |
|
1267 } |
1268 |
1268 |
1269 /** |
1269 /** |
1270 * Waits at most {@code millis} milliseconds for this thread to |
1270 * Waits at most {@code millis} milliseconds for this thread to |
1271 * die. A timeout of {@code 0} means to wait forever. |
1271 * die. A timeout of {@code 0} means to wait forever. |
1272 * |
1272 * |