Imported GNU Classpath 0.90

Imported GNU Classpath 0.90
       * scripts/makemake.tcl: LocaleData.java moved to gnu/java/locale.

       * sources.am: Regenerated.
       * gcj/javaprims.h: Regenerated.
       * Makefile.in: Regenerated.
       * gcj/Makefile.in: Regenerated.
       * include/Makefile.in: Regenerated.
       * testsuite/Makefile.in: Regenerated.

       * gnu/java/lang/VMInstrumentationImpl.java: New override.
       * gnu/java/net/local/LocalSocketImpl.java: Likewise.
       * gnu/classpath/jdwp/VMMethod.java: Likewise.
       * gnu/classpath/jdwp/VMVirtualMachine.java: Update to latest
       interface.
       * java/lang/Thread.java: Add UncaughtExceptionHandler.
       * java/lang/reflect/Method.java: Implements GenericDeclaration and
       isSynthetic(),
       * java/lang/reflect/Field.java: Likewise.
       * java/lang/reflect/Constructor.java
       * java/lang/Class.java: Implements Type, GenericDeclaration,
       getSimpleName() and getEnclosing*() methods.
       * java/lang/Class.h: Add new public methods.
       * java/lang/Math.java: Add signum(), ulp() and log10().
       * java/lang/natMath.cc (log10): New function.
       * java/security/VMSecureRandom.java: New override.
       * java/util/logging/Logger.java: Updated to latest classpath
       version.
       * java/util/logging/LogManager.java: New override.

From-SVN: r113887
This commit is contained in:
Mark Wielaard 2006-05-18 17:29:21 +00:00
parent eaec4980e1
commit 4f9533c772
1640 changed files with 126485 additions and 104808 deletions

View file

@ -37,6 +37,8 @@ exception statement from your version. */
package java.lang;
import java.util.List;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileDescriptor;
@ -50,6 +52,7 @@ import java.io.PrintStream;
* VM must implement.
*
* @author John Keiser
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
*/
final class VMSystem
{
@ -134,41 +137,77 @@ final class VMSystem
*/
public static native long currentTimeMillis();
/**
* <p>
* Returns the current value of a nanosecond-precise system timer.
* The value of the timer is an offset relative to some arbitrary fixed
* time, which may be in the future (making the value negative). This
* method is useful for timing events where nanosecond precision is
* required. This is achieved by calling this method before and after the
* event, and taking the difference betweent the two times:
* </p>
* <p>
* <code>long startTime = System.nanoTime();</code><br />
* <code>... <emph>event code</emph> ...</code><br />
* <code>long endTime = System.nanoTime();</code><br />
* <code>long duration = endTime - startTime;</code><br />
* </p>
* <p>
* Note that the value is only nanosecond-precise, and not accurate; there
* is no guarantee that the difference between two values is really a
* nanosecond. Also, the value is prone to overflow if the offset
* exceeds 2^63.
* </p>
*
* @return the time of a system timer in nanoseconds.
* @since 1.5
*/
public static long nanoTime()
{
return currentTimeMillis() * 1000;
}
/**
* Returns a list of 'name=value' pairs representing the current environment
* variables.
*
* @return a list of 'name=value' pairs.
*/
static native List environ();
/**
* Helper method which creates the standard input stream.
* VM implementors may choose to construct these streams differently.
* This method can also return null if the stream is created somewhere
* else in the VM startup sequence.
*/
static InputStream makeStandardInputStream()
{
return new BufferedInputStream(new FileInputStream(FileDescriptor.in));
}
static InputStream makeStandardInputStream()
{
return new BufferedInputStream(new FileInputStream(FileDescriptor.in));
}
/**
* Helper method which creates the standard output stream.
* VM implementors may choose to construct these streams differently.
* This method can also return null if the stream is created somewhere
* else in the VM startup sequence.
*/
static PrintStream makeStandardOutputStream()
{
return new PrintStream(new BufferedOutputStream(new FileOutputStream(FileDescriptor.out)), true);
}
static PrintStream makeStandardOutputStream()
{
return new PrintStream(new BufferedOutputStream(new FileOutputStream(FileDescriptor.out)), true);
}
/**
* Helper method which creates the standard error stream.
* VM implementors may choose to construct these streams differently.
* This method can also return null if the stream is created somewhere
* else in the VM startup sequence.
*/
static PrintStream makeStandardErrorStream()
{
return new PrintStream(new BufferedOutputStream(new FileOutputStream(FileDescriptor.err)), true);
}
static PrintStream makeStandardErrorStream()
{
return new PrintStream(new BufferedOutputStream(new FileOutputStream(FileDescriptor.err)), true);
}
/**
* Gets the value of an environment variable.
* Always returning null is a valid (but not very useful) implementation.