80 * @params slot the slot in the shutdown hook array, whose element
81 * will be invoked in order during shutdown
82 * @params registerShutdownInProgress true to allow the hook
83 * to be registered even if the shutdown is in progress.
84 * @params hook the hook to be registered
85 *
86 * @throw IllegalStateException if shutdown is in progress and
87 * the slot is not valid to register.
88 */
89 void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook);
90
91 /**
92 * Returns the number of stack frames represented by the given throwable.
93 */
94 int getStackTraceDepth(Throwable t);
95
96 /**
97 * Returns the ith StackTraceElement for the given throwable.
98 */
99 StackTraceElement getStackTraceElement(Throwable t, int i);
100 }
|
80 * @params slot the slot in the shutdown hook array, whose element
81 * will be invoked in order during shutdown
82 * @params registerShutdownInProgress true to allow the hook
83 * to be registered even if the shutdown is in progress.
84 * @params hook the hook to be registered
85 *
86 * @throw IllegalStateException if shutdown is in progress and
87 * the slot is not valid to register.
88 */
89 void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook);
90
91 /**
92 * Returns the number of stack frames represented by the given throwable.
93 */
94 int getStackTraceDepth(Throwable t);
95
96 /**
97 * Returns the ith StackTraceElement for the given throwable.
98 */
99 StackTraceElement getStackTraceElement(Throwable t, int i);
100
101 /**
102 * Returns a string backed by the provided character array. The character
103 * array must not be modified after the string is created in order to
104 * fulfill String's contract.
105 *
106 * @param chars the character array to back the string.
107 * @return a newly created string whose content is the character array.
108 */
109 String createStringSharedChars(char[] chars);
110
111 /**
112 * Format a long (treated as unsigned) into a character buffer.
113 * @param val the unsigned long to format
114 * @param shift the log2 of the base to format in (4 for hex, 3 for octal, 1 for binary)
115 * @param buf the character buffer to write to
116 * @param offset the offset in the destination buffer to start at
117 * @param len the number of characters to write
118 * @return the lowest character location used
119 */
120 int formatUnsignedLong(long val, int shift, char[] buf, int offset, int len);
121 }
|