1 |
/* VMDouble.java -- VM Specific Double methods |
/* VMDouble.java -- VM Specific Double methods |
2 |
Copyright (C) 2003 Free Software Foundation |
Copyright (C) 2003, 2005 Free Software Foundation |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
47 |
|
|
48 |
/** |
/** |
49 |
* Code relocated from java.lang.Double by |
* Code relocated from java.lang.Double by |
50 |
* @author Dave Grove <groved@us.ibm.com> |
* @author Dave Grove (groved@us.ibm.com) |
51 |
*/ |
*/ |
52 |
final class VMDouble |
final class VMDouble |
53 |
{ |
{ |
61 |
{ |
{ |
62 |
System.loadLibrary("javalang"); |
System.loadLibrary("javalang"); |
63 |
} |
} |
64 |
|
|
65 |
|
initIDs(); |
66 |
} |
} |
67 |
|
|
68 |
/** |
/** |
112 |
*/ |
*/ |
113 |
public static native double longBitsToDouble(long bits); |
public static native double longBitsToDouble(long bits); |
114 |
|
|
115 |
|
/** |
116 |
|
* Helper method to convert to string. |
117 |
|
* |
118 |
|
* @param d the double to convert |
119 |
|
* @param isFloat true if the conversion is requested by Float (results in |
120 |
|
* fewer digits) |
121 |
|
*/ |
122 |
|
public static native String toString(double d, boolean isFloat); |
123 |
|
|
124 |
|
/** |
125 |
|
* Initialize JNI cache. This method is called only by the |
126 |
|
* static initializer when using JNI. |
127 |
|
*/ |
128 |
|
public static native void initIDs(); |
129 |
|
|
130 |
} // class VMDouble |
public static native double parseDouble(String str); |
131 |
|
} |