Commit e109d16f by Tom Tromey Committed by Tom Tromey

javaprims.h: Rebuilt class list.

	* gcj/javaprims.h: Rebuilt class list.
	* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added VMClassLoader.
	* java/lang/VMClassLoader.java: New file.
	* java/lang/Boolean.java: Merged with Classpath.
	* java/lang/Byte.java: Merged with Classpath.
	* java/lang/Integer.java: Merged with Classpath.
	* java/lang/Long.java: Merged with Classpath.
	* java/lang/Number.java: Merged with Classpath.
	* java/lang/Short.java: Merged with Classpath.

From-SVN: r44274
parent 57de7530
2001-07-23 Tom Tromey <tromey@redhat.com>
* gcj/javaprims.h: Rebuilt class list.
* Makefile.in: Rebuilt.
* Makefile.am (core_java_source_files): Added VMClassLoader.
* java/lang/VMClassLoader.java: New file.
* java/lang/Boolean.java: Merged with Classpath.
* java/lang/Byte.java: Merged with Classpath.
* java/lang/Integer.java: Merged with Classpath.
* java/lang/Long.java: Merged with Classpath.
* java/lang/Number.java: Merged with Classpath.
* java/lang/Short.java: Merged with Classpath.
2001-07-22 Jeff Sturm <jsturm@one-point.com>
* configure.host: Enable hash synchronization for alpha*-*.
......
......@@ -847,6 +847,7 @@ java/lang/UnsatisfiedLinkError.java \
java/lang/UnsupportedOperationException.java \
java/lang/VerifyError.java \
java/lang/VirtualMachineError.java \
java/lang/VMClassLoader.java \
java/lang/Void.java \
java/io/BufferedInputStream.java \
java/io/BufferedOutputStream.java \
......
......@@ -617,6 +617,7 @@ java/lang/UnsatisfiedLinkError.java \
java/lang/UnsupportedOperationException.java \
java/lang/VerifyError.java \
java/lang/VirtualMachineError.java \
java/lang/VMClassLoader.java \
java/lang/Void.java \
java/io/BufferedInputStream.java \
java/io/BufferedOutputStream.java \
......@@ -1663,8 +1664,9 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
.deps/java/lang/ThreadLocal.P .deps/java/lang/Throwable.P \
.deps/java/lang/UnknownError.P .deps/java/lang/UnsatisfiedLinkError.P \
.deps/java/lang/UnsupportedOperationException.P \
.deps/java/lang/VerifyError.P .deps/java/lang/VirtualMachineError.P \
.deps/java/lang/Void.P .deps/java/lang/dtoa.P .deps/java/lang/e_acos.P \
.deps/java/lang/VMClassLoader.P .deps/java/lang/VerifyError.P \
.deps/java/lang/VirtualMachineError.P .deps/java/lang/Void.P \
.deps/java/lang/dtoa.P .deps/java/lang/e_acos.P \
.deps/java/lang/e_asin.P .deps/java/lang/e_atan2.P \
.deps/java/lang/e_exp.P .deps/java/lang/e_fmod.P \
.deps/java/lang/e_log.P .deps/java/lang/e_pow.P \
......
......@@ -95,6 +95,7 @@ LIBGCJTESTSPEC = @LIBGCJTESTSPEC@
LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@
LIBGCJ_CXXFLAGS = @LIBGCJ_CXXFLAGS@
LIBGCJ_JAVAFLAGS = @LIBGCJ_JAVAFLAGS@
LIBICONV = @LIBICONV@
LIBLTDL = @LIBLTDL@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
......
......@@ -197,10 +197,13 @@ extern "Java"
class Thread;
class ThreadDeath;
class ThreadGroup;
class ThreadLocal;
class ThreadLocal$Value;
class Throwable;
class UnknownError;
class UnsatisfiedLinkError;
class UnsupportedOperationException;
class VMClassLoader;
class VerifyError;
class VirtualMachineError;
class Void;
......
/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
/* Boolean.java -- object wrapper for boolean
Copyright (C) 1998, 2001 Free Software Foundation, Inc.
This file is part of libgcj.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.lang;
import java.io.Serializable;
/**
* @author Warren Levy <warrenl@cygnus.com>
* @date September 3, 1998.
*/
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* plus online API docs for JDK 1.2 beta from http://www.javasoft.com.
* Status: Believed complete and correct.
* Instances of class <code>Boolean</code> represent primitive
* <code>boolean</code> values.
*
* @author Paul Fisher
* @since JDK1.0
*/
public final class Boolean extends Object implements Serializable
public final class Boolean implements Serializable
{
public static final Boolean FALSE = new Boolean(false);
public static final Boolean TRUE = new Boolean(true);
static final long serialVersionUID = -3665804199014368530L;
// This initialization is seemingly circular, but it is accepted
// by javac, and is handled specially by gcc.
public static final Class TYPE = boolean.class;
/**
* This field is a <code>Boolean</code> object representing the
* primitive value <code>true</code>. This instance is returned
* by the static <code>valueOf()</code> methods if they return
* a <code>Boolean</code> representing <code>true</code>.
*/
public static final Boolean TRUE = new Boolean(true);
/* The boolean value of the instance. */
private boolean value;
/**
* This field is a <code>Boolean</code> object representing the
* primitive value <code>false</code>. This instance is returned
* by the static <code>valueOf()</code> methods if they return
* a <code>Boolean</code> representing <code>false</code>.
*/
public static final Boolean FALSE = new Boolean(false);
private static final long serialVersionUID = -3665804199014368530L;
/**
* The primitive type <code>boolean</code> is represented by this
* <code>Class</code> object.
*/
public static final Class TYPE = VMClassLoader.getPrimitiveClass("boolean");
public Boolean(boolean boolVal)
{
value = boolVal;
/**
* The immutable value of this Boolean.
*/
private final boolean value;
/**
* Create a <code>Boolean</code> object representing the value of the
* argument <code>value</code>. In general the use of the static
* method <code>valueof(boolean)</code> is more efficient since it will
* not create a new object.
*
* @param value the primitive value of this <code>Boolean</code>
*/
public Boolean(boolean value) {
this.value = value;
}
public Boolean(String strVal)
{
value = (strVal == null ? false : strVal.equalsIgnoreCase("true"));
/**
* Creates a <code>Boolean</code> object representing the primitive
* <code>true</code> if and only if <code>s</code> matches
* the string "true" ignoring case, otherwise the object will represent
* the primitive <code>false</code>. In general the use of the static
* method <code>valueof(String)</code> is more efficient since it will
* not create a new object.
*
* @param s the <code>String</code> representation of <code>true</code>
* or false
*/
public Boolean(String s) {
value = "true".equalsIgnoreCase(s);
}
public boolean booleanValue()
{
/**
* Return the primitive <code>boolean</code> value of this
* <code>Boolean</code> object.
*/
public boolean booleanValue() {
return value;
}
public boolean equals(Object obj)
{
/* Don't need to compare obj to null as instanceof will do this. */
if (obj instanceof Boolean)
return value == ((Boolean) obj).value;
return false;
/**
* Returns the Boolean <code>TRUE</code> if the given boolean is
* <code>true</code>, otherwise it will return the Boolean
* <code>FALSE</code>.
*
* @since 1.4
*/
public static Boolean valueOf(boolean b) {
return b ? TRUE : FALSE;
}
public static boolean getBoolean(String property)
{
/* TBD: If a security manager exists and it doesn't permit accessing
* the property, it will throw an exception. Should we catch it?
/**
* Returns the Boolean <code>TRUE</code> if and only if the given
* String is equal, ignoring case, to the the String "true", otherwise
* it will return the Boolean <code>FALSE</code>.
*/
try
{
String val = System.getProperty(property);
return val == null ? false : val.equalsIgnoreCase("true");
public static Boolean valueOf(String s) {
return "true".equalsIgnoreCase(s) ? TRUE : FALSE;
}
catch (SecurityException e)
{
return false;
/**
* Returns the integer <code>1231</code> if this object represents
* the primitive <code>true</code> and the integer <code>1237</code>
* otherwise.
*/
public int hashCode() {
return (value) ? 1231 : 1237;
}
/**
* If the <code>obj</code> is an instance of <code>Boolean</code> and
* has the same primitive value as this object then <code>true</code>
* is returned. In all other cases, including if the <code>obj</code>
* is <code>null</code>, <code>false</code> is returned.
*
* @param obj possibly an instance of any <code>Class</code>
* @return <code>false</code> is <code>obj</code> is an instance of
* <code>Boolean</code> and has the same primitive value as this
* object.
*/
public boolean equals(Object obj) {
return (obj instanceof Boolean && value == ((Boolean)obj).value);
}
public int hashCode()
{
/* These values are from the Java Lang. Spec. (Sec 20.4.7).
* TBD: They could be made private static final fields but they're only
* used here (and shouldn't be used anywhere else), though it might be
* useful to grep on something like JAVA_HASH_* values for us as
* developers.
/**
* If the value of the system property <code>name</code> matches
* "true" ignoring case then the function returns <code>true</code>.
*/
return value ? 1231 : 1237;
public static boolean getBoolean(String name) {
String val = System.getProperty(name);
return ("true".equalsIgnoreCase(val));
}
public String toString()
/**
* Returns "true" if the value of the give boolean is <code>true</code> and
* returns "false" if the value of the given boolean is <code>false</code>.
*
* @since 1.4
*/
public static String toString(boolean b)
{
return value ? "true" : "false";
return b ? "true" : "false";
}
public static Boolean valueOf(String str)
/**
* Returns "true" if the value of this object is <code>true</code> and
* returns "false" if the value of this object is <code>false</code>.
*/
public String toString()
{
if (str == null)
return FALSE;
else
/* This returns a Boolean (big B), not a boolean (little b). */
return str.equalsIgnoreCase("true") ? TRUE : FALSE;
return (value) ? "true" : "false";
}
}
/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
/* java.lang.Number
Copyright (C) 1998, 2001 Free Software Foundation, Inc.
This file is part of libgcj.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.lang;
import java.io.Serializable;
/**
* @author Warren Levy <warrenl@cygnus.com>
* @date September 2, 1998.
*/
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* plus online API docs for JDK 1.2 beta from http://www.javasoft.com.
* Status: Believed complete and correct.
*/
** Number is a generic superclass of all the numeric classes, namely
** <code>Byte</code>, <code>Short</code>, <code>Integer</code>,
** <code>Long</code>, <code>Float</code>, and <code>Double</code>.
**
** It provides ways to convert from any one value to any other.
**
** @author Paul Fisher
** @author John Keiser
** @author Warren Levy
** @since JDK1.0
**/
public abstract class Number implements Serializable
{
public byte byteValue() // Became non-abstract in JDK 1.2
/** Return the value of this <code>Number</code> as a <code>byte</code>.
** @return the value of this <code>Number</code> as a <code>byte</code>.
**/
public byte byteValue()
{
return (byte) intValue();
}
public abstract double doubleValue();
public abstract float floatValue();
public abstract int intValue();
public abstract long longValue();
public short shortValue() // Became non-abstract in JDK 1.2
/** Return the value of this <code>Number</code> as a <code>short</code>.
** @return the value of this <code>Number</code> as a <code>short</code>.
**/
public short shortValue()
{
return (short) intValue();
}
/** Return the value of this <code>Number</code> as an <code>int</code>.
** @return the value of this <code>Number</code> as an <code>int</code>.
**/
public abstract int intValue();
/** Return the value of this <code>Number</code> as a <code>long</code>.
** @return the value of this <code>Number</code> as a <code>long</code>.
**/
public abstract long longValue();
/** Return the value of this <code>Number</code> as a <code>float</code>.
** @return the value of this <code>Number</code> as a <code>float</code>.
**/
public abstract float floatValue();
/** Return the value of this <code>Number</code> as a <code>float</code>.
** @return the value of this <code>Number</code> as a <code>float</code>.
**/
public abstract double doubleValue();
private static final long serialVersionUID = -8742448824652078965L;
}
/*
* java.lang.ClassLoader: part of the Java Class Libraries project.
* Copyright (C) 1998, 2001 Free Software Foundation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
package java.lang;
/**
* java.lang.VMClassLoader is a package-private helper for VMs to implement
* on behalf of java.lang.ClassLoader.
*
* @author John Keiser
* @version 1.1.0, Sep 22 1998
* @since CP1.1
*/
class VMClassLoader {
/**
* Helper to define a class using a string of bytes.
*
* @param name the name to give the class. null if unknown.
* @param data the data representing the classfile, in classfile format.
* @param offset the offset into the data where the classfile starts.
* @param len the length of the classfile data in the array.
* @return the class that was defined.
* @exception ClassFormatError if the byte array is not in proper classfile format.
*/
// Not yet needed for libgcj.
// final static native Class defineClass(ClassLoader cl, String name,
// byte[] data, int offset, int len) throws ClassFormatError;
/**
* Helper to resolve all references to other classes from this class.
* @param c the class to resolve.
*/
// Not yet needed for libgcj.
// final static native void resolveClass(Class c);
/**
* Helper for java.lang.Integer, Byte, etc. to get the TYPE class
* at initialization time. If there are multiple classloaders, this
* method may be called once per ClassLoader per type.
*
* @param type name of the primitive type; i.e. "int", "byte", etc.
* @return a "bogus" class representing the primitive type.
*/
static final Class getPrimitiveClass(String type)
{
if ("int".equals (type))
return int.class;
else if ("long".equals (type))
return int.class;
else if ("boolean".equals (type))
return int.class;
else if ("short".equals (type))
return int.class;
else if ("char".equals (type))
return int.class;
else if ("byte".equals (type))
return int.class;
else if ("float".equals (type))
return int.class;
else if ("double".equals (type))
return int.class;
else if ("void".equals (type))
return int.class;
return null;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment