|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface UtilCompatible
Interface containing methods which are implemented differently in different versions of the JDK.
The methods should not be called directly, only via the corresponding
static methods in Util, namely:
This interface could in principle be extended to allow native implementations of methods, or to serve as a factory for entire classes which have different implementations in different environments.
| Method Summary | ||
|---|---|---|
|
binarySearch(T[] ts,
int start,
int end,
T t)
As Arrays.binarySearch(Object[], int, int, Object), but
available pre-JDK 1.6. |
|
void |
cancelAndCloseStatement(Statement stmt)
Cancels and closes a SQL Statement object. |
|
|
compileScript(Class<T> iface,
String script,
String engineName)
Compiles a script to yield a Java interface. |
|
String |
generateUuidString()
|
|
|
getAnnotation(Method method,
String annotationClassName,
T defaultValue)
|
|
Util.MemoryInfo |
getMemoryInfo()
Creates an object from which to get information about system memory use. |
|
BigDecimal |
makeBigDecimalFromDouble(double d)
|
|
|
newIdentityHashSet()
Creates a hash set that, like IdentityHashMap,
compares keys using identity. |
|
Timer |
newTimer(String name,
boolean isDaemon)
Equivalent to Timer.Timer(String, boolean). |
|
String |
quotePattern(String s)
|
|
|
threadLocalRemove(ThreadLocal<T> threadLocal)
Removes a thread local from the current thread. |
|
| Method Detail |
|---|
BigDecimal makeBigDecimalFromDouble(double d)
String quotePattern(String s)
<T> T getAnnotation(Method method,
String annotationClassName,
T defaultValue)
String generateUuidString()
void cancelAndCloseStatement(Statement stmt)
Util.
stmt - The statement to close.
<T> T compileScript(Class<T> iface,
String script,
String engineName)
T - Interfaceiface - Interface script should implementscript - Script codeengineName - Name of engine (e.g. "JavaScript")
<T> void threadLocalRemove(ThreadLocal<T> threadLocal)
From JDK 1.5 onwards, calls ThreadLocal.remove(); before
that, no-ops.
T - TypethreadLocal - Thread local<T> Set<T> newIdentityHashSet()
IdentityHashMap,
compares keys using identity.
T - Element type
<T extends Comparable<T>> int binarySearch(T[] ts,
int start,
int end,
T t)
Arrays.binarySearch(Object[], int, int, Object), but
available pre-JDK 1.6.
Util.MemoryInfo getMemoryInfo()
MemoryPoolMXBean.
Timer newTimer(String name,
boolean isDaemon)
Timer.Timer(String, boolean).
(Introduced in JDK 1.5.)
name - the name of the associated threadisDaemon - true if the associated thread should run as a daemon
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||