LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Sponsors
  • Mirrors
  • Logos
  • Contact us
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Cvs-checkins > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: cvs at opencores.org<cvs@o...>
    Date: Thu Oct 26 02:48:42 CEST 2006
    Subject: [cvs-checkins] MODIFIED: jop ...
    Top
    Date: 00/06/10 26:02:48

    Added: jop/java/target/src/jdk11/java/lang ArithmeticException.java
    Boolean.java Byte.java ClassCastException.java
    ClassNotFoundException.java
    IllegalAccessException.java
    IllegalMonitorStateException.java
    IllegalThreadStateException.java
    InstantiationException.java
    InterruptedException.java Math.java
    NegativeArraySizeException.java
    OutOfMemoryError.java Runtime.java
    SecurityException.java Short.java Thread.java
    VirtualMachineError.java
    Log:
    merge with Nelsons JDK and split into three source directories


    Revision Changes Path
    1.1 jop/java/target/src/jdk11/java/lang/ArithmeticException.java

    http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/ArithmeticException.java?rev=1.1&content-type=text/x-cvsweb-markup

    Index: ArithmeticException.java
    ===================================================================
    /* ArithmeticException.java -- exception thrown to indicate conditions
    like divide by zero.
    Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc.

    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., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301 USA.

    Linking this library statically or dynamically with other modules is
    making a combined work based on this library. Thus, the terms and
    conditions of the GNU General Public License cover the whole
    combination.

    As a special exception, the copyright holders of this library give you
    permission to link this library with independent modules to produce an
    executable, regardless of the license terms of these independent
    modules, and to copy and distribute the resulting executable under
    terms of your choice, provided that you also meet, for each linked
    independent module, the terms and conditions of the license of that
    module. An independent module is a module which is not derived from
    or based on this library. If you modify this library, you may extend
    this exception to your version of the library, but you are not
    obligated to do so. If you do not wish to do so, delete this
    exception statement from your version. */


    package java.lang;

    /**
    * Thrown when a math error has occured, such as trying to divide an
    * integer by zero. For example:<br>
    * <pre>
    * int i = 0;
    * int j = 2 / i;
    * </pre>
    *
    * @author Brian Jones
    * @author Warren Levy (warrenl@c...)
    * @status updated to 1.4
    */
    public class ArithmeticException extends RuntimeException
    {
    /**
    * Compatible with JDK 1.0+.
    */
    private static final long serialVersionUID = 2256477558314496007L;

    /**
    * Create an exception without a message.
    */
    public ArithmeticException()
    {
    }

    /**
    * Create an exception with a message.
    *
    * @param s the message
    */
    public ArithmeticException(String s)
    {
    super(s);
    }
    }
    1.1 jop/java/target/src/jdk11/java/lang/Boolean.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/Boolean.java?rev=1.1&content-type=text/x-cvsweb-markup Index: Boolean.java =================================================================== /* Boolean.java -- object wrapper for boolean Copyright (C) 1998, 2001, 2002, 2005, 2006 Free Software Foundation, Inc. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.lang; import java.io.Serializable; /** * Instances of class <code>Boolean</code> represent primitive * <code>boolean</code> values. * * @author Paul Fisher * @author Eric Blake (ebb9@e...) * @since 1.0 * @status updated to 1.5 */ public final class Boolean { /** * Compatible with JDK 1.0.2+. */ private static final long serialVersionUID = -3665804199014368530L; /** * 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); /** * 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); /** * The primitive type <code>boolean</code> is represented by this * <code>Class</code> object. * * @since 1.1 */ // public static final Class TYPE = VMClassLoader.getPrimitiveClass('Z'); /** * The immutable value of this Boolean. * * @serial the wrapped value */ 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> * @see #valueOf(boolean) */ public Boolean(boolean value) { this.value = value; } /** * 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) { // TODO this is a workaround to equalsIgnoreCase() value = ("true".equals(s) || "TRUE".equals(s) || "True".equals(s)); } /** * Return the primitive <code>boolean</code> value of this * <code>Boolean</code> object. * * @return true or false, depending on the value of this Boolean */ public boolean booleanValue() { return value; } /** * Returns the Boolean <code>TRUE</code> if the given boolean is * <code>true</code>, otherwise it will return the Boolean * <code>FALSE</code>. * * @param b * the boolean to wrap * @return the wrapper object * @see #TRUE * @see #FALSE * @since 1.4 */ public static Boolean valueOf(boolean b) { return b ? TRUE : FALSE; } /** * 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>. * * @return the string representation of this */ public String toString() { return value ? "true" : "false"; } /** * Returns the integer <code>1231</code> if this object represents the * primitive <code>true</code> and the integer <code>1237</code> * otherwise. * * @return the hash code */ 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 true if <code>obj</code> equals this */ public boolean equals(Object obj) { // TODO: instanceof... return value == ((Boolean) obj).value; } } 1.1 jop/java/target/src/jdk11/java/lang/Byte.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/Byte.java?rev=1.1&content-type=text/x-cvsweb-markup Index: Byte.java =================================================================== /* Byte.java -- object wrapper for byte Copyright (C) 1998, 2001, 2002, 2005 Free Software Foundation, Inc. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.lang; /** * Instances of class <code>Byte</code> represent primitive <code>byte</code> * values. * * Additionally, this class provides various helper functions and variables * useful to bytes. * * @author Paul Fisher * @author John Keiser * @author Per Bothner * @author Eric Blake (ebb9@e...) * @since 1.1 * @status updated to 1.5 */ public final class Byte { /** * The minimum value a <code>byte</code> can represent is -128 (or -2<sup>7</sup>). */ public static final byte MIN_VALUE = -128; /** * The maximum value a <code>byte</code> can represent is 127 (or 2<sup>7</sup> - * 1). */ public static final byte MAX_VALUE = 127; /** * The number of bits needed to represent a <code>byte</code>. * * @since 1.5 */ public static final int SIZE = 8; /** * The immutable value of this Byte. * * @serial the wrapped byte */ private final byte value; /** * Create a <code>Byte</code> object representing the value of the * <code>byte</code> argument. * * @param value * the value to use */ public Byte(byte value) { this.value = value; } /** * Return the value of this <code>Byte</code>. * * @return the byte value */ public byte byteValue() { return value; } /** * Returns <code>true</code> if <code>obj</code> is an instance of * <code>Byte</code> and represents the same byte value. * * @param obj * the object to compare * @return whether these Objects are semantically equal */ public boolean equals(Object obj) { //TODO: instanceof not implemented yet //return obj instanceof Byte && value == ((Byte) obj).value; return value == ((Byte) obj).value; } /** * Return a hashcode representing this Object. <code>Byte</code>'s hash * code is simply its value. * * @return this Object's hash code */ public int hashCode() { return value; } /** * Converts the specified <code>String</code> into a <code>byte</code>. * This function assumes a radix of 10. * * @param s * the <code>String</code> to convert * @return the <code>byte</code> value of <code>s</code> * @throws NumberFormatException * if <code>s</code> cannot be parsed as a <code>byte</code> * @see #parseByte(String) */ public static byte parseByte(String s) { return parseByte(s, 10); } /** * Converts the specified <code>String</code> into an <code>int</code> * using the specified radix (base). The string must not be * <code>null</code> or empty. It may begin with an optional '-', which * will negate the answer, provided that there are also valid digits. Each * digit is parsed as if by <code>Character.digit(d, radix)</code>, and * must be in the range <code>0</code> to <code>radix - 1</code>. * Finally, the result must be within <code>MIN_VALUE</code> to * <code>MAX_VALUE</code>, inclusive. Unlike Double.parseDouble, you may * not have a leading '+'. * * @param s * the <code>String</code> to convert * @param radix * the radix (base) to use in the conversion * @return the <code>String</code> argument converted to <code>byte</code> * @throws NumberFormatException * if <code>s</code> cannot be parsed as a <code>byte</code> */ public static byte parseByte(String s, int radix) { int i = Integer.parseInt(s, radix); if ((byte) i != i) throw new NumberFormatException(); return (byte) i; } /** * Converts the <code>Byte</code> value to a <code>String</code> and * assumes a radix of 10. * * @return the <code>String</code> representation of this * <code>Byte</code> * @see Integer#toString() */ public String toString() { return String.valueOf(value); } } 1.1 jop/java/target/src/jdk11/java/lang/ClassCastException.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/ClassCastException.java?rev=1.1&content-type=text/x-cvsweb-markup Index: ClassCastException.java =================================================================== /* ClassCastException.java -- exception thrown on bad cast Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.lang; /** * Thrown when an attempt is made to cast an object which is not of the * appropriate runtime type. For example:<br> * <pre> * Object o = new Vector(); * String s = (String) o; * </pre> * * @author Brian Jones * @author Warren Levy (warrenl@c...) * @status updated to 1.4 */ public class ClassCastException extends RuntimeException { /** * Compatible with JDK 1.0+. */ private static final long serialVersionUID = -9223365651070458532L; /** * Create an exception without a message. */ public ClassCastException() { } /** * Create an exception with a message. * * @param s the message */ public ClassCastException(String s) { super(s); } } 1.1 jop/java/target/src/jdk11/java/lang/ClassNotFoundException.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/ClassNotFoundException.java?rev=1.1&content-type=text/x-cvsweb-markup Index: ClassNotFoundException.java =================================================================== /* ClassNotFoundException.java -- thrown when class definition cannot be found Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.lang; /** * Thrown when a class is requested by reflection, but the class definition * cannot be found. This exception is often chained from another Throwable. * * @author Brian Jones * @author Eric Blake (ebb9@e...) * @see Class#forName(String) * @see ClassLoader#findSystemClass(String) * @see ClassLoader#loadClass(String, boolean) * @status updated to 1.4 */ public class ClassNotFoundException extends Exception { /** * Compatible with JDK 1.0+. */ private static final long serialVersionUID = 9176873029745254542L; /** * The cause of this exception (duplicates the one stored in Throwable). * * @serial the exception cause * @since 1.2 */ private final Throwable ex; /** * Create an exception without a message. Note that this initializes the * cause to null. */ public ClassNotFoundException() { this(null); } /** * Create an exception with a message. Note that this initializes the * cause to null. * * @param s the message */ public ClassNotFoundException(String s) { super(s); ex = null; } /** * Create an exception with a message and chain it to the exception * which occurred while loading the class. * * @param s the message * @param ex the chained exception * @since 1.2 */ public ClassNotFoundException(String s, Throwable ex) { super(s, ex); this.ex = ex; } /** * Returns the exception which occurred while loading the class, * otherwise returns null. This is a legacy method; the preferred choice * now is {@link Throwable#getCause()}. * * @return the cause of this exception * @since 1.2 */ public Throwable getException() { return ex; } /** * Returns the exception which occurred while loading the class, * otherwise returns null. * * @return the cause of this exception * @since 1.4 */ public Throwable getCause() { return ex; } } 1.1 jop/java/target/src/jdk11/java/lang/IllegalAccessException.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/IllegalAccessException.java?rev=1.1&content-type=text/x-cvsweb-markup Index: IllegalAccessException.java =================================================================== /* IllegalAccessException.java -- thrown on attempt to reflect on inaccessible data Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.lang; /** * Thrown whenever a reflective method tries to do something that the * compiler would not allow. For example, using reflection to set a private * variable that belongs to a class in another package is bad. * * @author Brian Jones * @author Warren Levy (warrenl@c...) * @see Class#newInstance() * @see Field#set(Object, Object) * @see Field#setBoolean(Object, boolean) * @see Field#setByte(Object, byte) * @see Field#setShort(Object, short) * @see Field#setChar(Object, char) * @see Field#setInt(Object, int) * @see Field#setLong(Object, long) * @see Field#setFloat(Object, float) * @see Field#setDouble(Object, double) * @see Field#get(Object) * @see Field#getBoolean(Object) * @see Field#getByte(Object) * @see Field#getShort(Object) * @see Field#getChar(Object) * @see Field#getInt(Object) * @see Field#getLong(Object) * @see Field#getFloat(Object) * @see Field#getDouble(Object) * @see Method#invoke(Object, Object[]) * @see Constructor#newInstance(Object[]) * @status updated to 1.4 */ public class IllegalAccessException extends Exception { /** * Create an exception without a message. */ public IllegalAccessException() { } /** * Create an exception with a message. * * @param s the message */ public IllegalAccessException(String s) { super(s); } } 1.1 jop/java/target/src/jdk11/java/lang/IllegalMonitorStateException.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/IllegalMonitorStateException.java?rev=1.1&content-type=text/x-cvsweb-markup Index: IllegalMonitorStateException.java =================================================================== /* IllegalMonitorStateException.java -- thrown when trying to wait or notify a monitor that is not owned Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.lang; /** * Thrown when a thread attempts to wait or notify on a monitor that it * does not own (ie. it has not synchronized on the object). For example:<br> * <pre> * void m() { * notify(); * } * </pre> * * @author Brian Jones * @author Warren Levy (warrenl@c...) * @status updated to 1.4 */ public class IllegalMonitorStateException extends RuntimeException { /** * Compatible with JDK 1.0+. */ private static final long serialVersionUID = 3713306369498869069L; /** * Create an exception without a message. */ public IllegalMonitorStateException() { } /** * Create an exception with a message. * * @param s the message */ public IllegalMonitorStateException(String s) { super(s); } } 1.1 jop/java/target/src/jdk11/java/lang/IllegalThreadStateException.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/IllegalThreadStateException.java?rev=1.1&content-type=text/x-cvsweb-markup Index: IllegalThreadStateException.java =================================================================== /* IllegalThreadStateException.java -- thrown when trying to manipulate a Thread when it is not in an appropriate state Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.lang; /** * Thrown When trying to manipulate a Thread which is in an inappropriate * state. Since the documentation suggests that this can happen with * <code>Thread.suspend</code> or <code>Thread.resume</code>, but these * two methods are deprecated, this exception is likely very rare. * * @author Brian Jones * @author Warren Levy (warrenl@c...) * @status updated to 1.4 */ public class IllegalThreadStateException extends IllegalArgumentException { /** * Compatible with JDK 1.0+. */ private static final long serialVersionUID = -7626246362397460174L; /** * Create an exception without a message. */ public IllegalThreadStateException() { } /** * Create an exception with a message. * * @param s the message */ public IllegalThreadStateException(String s) { super(s); } } 1.1 jop/java/target/src/jdk11/java/lang/InstantiationException.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/InstantiationException.java?rev=1.1&content-type=text/x-cvsweb-markup Index: InstantiationException.java =================================================================== /* InstantiationException.java -- thrown when reflection cannot create an instance Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.lang; /** * Thrown when an attempt is made to use reflection to build a * non-instantiable class (an interface or abstract class). * * @author Brian Jones * @author Warren Levy (warrenl@c...) * @see Class#newInstance() * @status updated to 1.4 */ public class InstantiationException extends Exception { /** * Compatible with JDK 1.0+. */ private static final long serialVersionUID = -8441929162975509110L; /** * Create an exception without a message. */ public InstantiationException() { } /** * Create an exception with a message. * * @param s the message */ public InstantiationException(String s) { super(s); } } 1.1 jop/java/target/src/jdk11/java/lang/InterruptedException.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/InterruptedException.java?rev=1.1&content-type=text/x-cvsweb-markup Index: InterruptedException.java =================================================================== /* InterruptedException.java -- thrown when a thread is interrupted Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.lang; /** * Thrown when a thread interrupts another thread which was previously * sleeping, waiting, or paused in some other way. See the * <code>interrupt</code> method of class <code>Thread</code>. * * @author Brian Jones * @author Warren Levy (warrenl@c...) * @see Object#wait() * @see Object#wait(long) * @see Object#wait(long, int) * @see Thread#sleep(long) * @see Thread#interrupt() * @see Thread#interrupted() * @status updated to 1.4 */ public class InterruptedException extends Exception { /** * Compatible with JDK 1.0+. */ private static final long serialVersionUID = 6700697376100628473L; /** * Create an exception without a message. */ public InterruptedException() { } /** * Create an exception with a message. * * * @param s the message */ public InterruptedException(String s) { super(s); } } 1.1 jop/java/target/src/jdk11/java/lang/Math.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/Math.java?rev=1.1&content-type=text/x-cvsweb-markup Index: Math.java =================================================================== /* java.lang.Math -- common mathematical functions, native allowed (VMMath) Copyright (C) 1998, 2001, 2002, 2003, 2006 Free Software Foundation, Inc. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.lang; // import gnu.classpath.Configuration; // import java.util.Random; /** * Helper class containing useful mathematical functions and constants. * <P> * * Note that angles are specified in radians. Conversion functions are provided * for your convenience. * * @author Paul Fisher * @author John Keiser * @author Eric Blake (ebb9@e...) * @author Andrew John Hughes (gnu_andrew@m...) * @since 1.0 */ public final class Math { // FIXME - This is here because we need to load the "javalang" system // library somewhere late in the bootstrap cycle. We cannot do this // from VMSystem or VMRuntime since those are used to actually load // the library. This is mainly here because historically Math was // late enough in the bootstrap cycle to start using System after it // was initialized (called from the java.util classes). /** * Math is non-instantiable */ private Math() { } /** * A random number generator, initialized on first use. */ // private static Random rand; /** * The most accurate approximation to the mathematical constant <em>e</em>: * <code>2.718281828459045</code>. Used in natural log and exp. * * @see #log(double) * @see #exp(double) */ public static final double E = 2.718281828459045; /** * The most accurate approximation to the mathematical constant <em>pi</em>: * <code>3.141592653589793</code>. This is the ratio of a circle's * diameter to its circumference. */ public static final double PI = 3.141592653589793; /** * Take the absolute value of the argument. (Absolute value means make it * positive.) * <P> * * Note that the the largest negative value (Integer.MIN_VALUE) cannot be * made positive. In this case, because of the rules of negation in a * computer, MIN_VALUE is what will be returned. This is a <em>negative</em> * value. You have been warned. * * @param i * the number to take the absolute value of * @return the absolute value * @see Integer#MIN_VALUE */ public static int abs(int i) { return (i < 0) ? -i : i; } /** * Take the absolute value of the argument. (Absolute value means make it * positive.) * <P> * * Note that the the largest negative value (Long.MIN_VALUE) cannot be made * positive. In this case, because of the rules of negation in a computer, * MIN_VALUE is what will be returned. This is a <em>negative</em> value. * You have been warned. * * @param l * the number to take the absolute value of * @return the absolute value * @see Long#MIN_VALUE */ public static long abs(long l) { return (l < 0) ? -l : l; } /** * Return whichever argument is smaller. * * @param a * the first number * @param b * a second number * @return the smaller of the two numbers */ public static int min(int a, int b) { return (a < b) ? a : b; } /** * Return whichever argument is smaller. * * @param a * the first number * @param b * a second number * @return the smaller of the two numbers */ public static long min(long a, long b) { return (a < b) ? a : b; } /** * Return whichever argument is larger. * * @param a * the first number * @param b * a second number * @return the larger of the two numbers */ public static int max(int a, int b) { return (a > b) ? a : b; } /** * Return whichever argument is larger. * * @param a * the first number * @param b * a second number * @return the larger of the two numbers */ public static long max(long a, long b) { return (a > b) ? a : b; } } 1.1 jop/java/target/src/jdk11/java/lang/NegativeArraySizeException.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/NegativeArraySizeException.java?rev=1.1&content-type=text/x-cvsweb-markup Index: NegativeArraySizeException.java =================================================================== /* NegativeArraySizeException.java -- thrown on attempt to create array with a negative size Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.lang; /** * Thrown when an attempt is made to create an array with a negative * size. For example:<br> * <pre> * int i = -1; * int[] array = new int[i]; * </pre> * * @author Brian Jones * @author Warren Levy (warrenl@c...) * @status updated to 1.4 */ public class NegativeArraySizeException extends RuntimeException { /** * Compatible with JDK 1.0+. */ private static final long serialVersionUID = -8960118058596991861L; /** * Create an exception without a message. */ public NegativeArraySizeException() { } /** * Create an exception with a message. * * @param s the message */ public NegativeArraySizeException(String s) { super(s); } } 1.1 jop/java/target/src/jdk11/java/lang/OutOfMemoryError.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/OutOfMemoryError.java?rev=1.1&content-type=text/x-cvsweb-markup Index: OutOfMemoryError.java =================================================================== /* OutOfMemoryError.java -- thrown when a memory allocation fails Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.lang; /** * Thrown when the Java Virtual Machine is unable to allocate an object * because it is out of memory and no more memory could be made available * by the garbage collector. * * @author Brian Jones * @author Tom Tromey (tromey@c...) * @status updated to 1.4 */ public class OutOfMemoryError extends VirtualMachineError { /** * Compatible with JDK 1.0+. */ private static final long serialVersionUID = 8228564086184010517L; /** * Create an error without a message. */ public OutOfMemoryError() { } /** * Create an error with a message. * * @param s the message */ public OutOfMemoryError(String s) { super(s); } } 1.1 jop/java/target/src/jdk11/java/lang/Runtime.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/Runtime.java?rev=1.1&content-type=text/x-cvsweb-markup Index: Runtime.java =================================================================== /* Runtime.java -- access to the VM process Copyright (C) 1998, 2002, 2003, 2004, 2005 Free Software Foundation 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.lang; /** * Runtime represents the Virtual Machine. * * @author John Keiser * @author Eric Blake (ebb9@e...) * @author Jeroen Frijters */ // No idea why this class isn't final, since you can't build a subclass! public class Runtime { /** * The one and only runtime instance. */ private static final Runtime current = new Runtime(); /** * Not instantiable by a user, this should only create one instance. */ private Runtime() { //TODO: not implemented } /** * Get the current Runtime object for this JVM. This is necessary to access * the many instance methods of this class. * * @return the current Runtime object */ public static Runtime getRuntime() { return current; } /** * Exit the Java runtime. This method will either throw a SecurityException * or it will never return. The status code is returned to the system; often * a non-zero status code indicates an abnormal exit. Of course, there is a * security check, <code>checkExit(status)</code>. * * <p>First, all shutdown hooks are run, in unspecified order, and * concurrently. Next, if finalization on exit has been enabled, all pending * finalizers are run. Finally, the system calls <code>halt</code>.</p> * * <p>If this is run a second time after shutdown has already started, there * are two actions. If shutdown hooks are still executing, it blocks * indefinitely. Otherwise, if the status is nonzero it halts immediately; * if it is zero, it blocks indefinitely. This is typically called by * <code>System.exit</code>.</p> * * @param status the status to exit with * @throws SecurityException if permission is denied * @see #addShutdownHook(Thread) * @see #runFinalizersOnExit(boolean) * @see #runFinalization() * @see #halt(int) */ public void exit(int status) { com.jopdesign.sys.Startup.exit(); } /** * Find out how much memory is still free for allocating Objects on the heap. * * @return the number of bytes of free memory for more Objects */ public long freeMemory() { // TODO: not implemented return 0; } /** * Find out how much memory total is available on the heap for allocating * Objects. * * @return the total number of bytes of memory for Objects */ public long totalMemory() { //TODO: not implemented return 0; } /** * Run the garbage collector. This method is more of a suggestion than * anything. All this method guarantees is that the garbage collector will * have "done its best" by the time it returns. Notice that garbage * collection takes place even without calling this method. */ public void gc() { System.gc(); } } // class Runtime 1.1 jop/java/target/src/jdk11/java/lang/SecurityException.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/SecurityException.java?rev=1.1&content-type=text/x-cvsweb-markup Index: SecurityException.java =================================================================== /* SecurityException.java -- thrown to indicate a security violation Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.lang; /** * The security manager will throw this exception to indicate a security * violation. This can occur any time an operation is attempted which is * deemed unsafe by the current security policies. * * @author Brian Jones * @author Warren Levy (warrenl@c...) * @author Andrew John Hughes (gnu_andrew@m...) * @see SecurityManager * @status updated to 1.5 */ public class SecurityException extends RuntimeException { /** * Compatible with JDK 1.0+. */ private static final long serialVersionUID = 6878364983674394167L; /** * Create an exception without a message. */ public SecurityException() { } /** * Create an exception with a message. * * @param s the message */ public SecurityException(String s) { super(s); } /** * <p> * Constructs a <code>SecurityException</code> using * the specified error message, which should give further details * as to the reason for this exception. The specified cause * <code>Throwable</code> may be used to provide additional history, * with regards to the root of the problem. It is perfectly valid * for this to be null, if the cause of the problem is unknown. * </p> * <p> * <strong>Note</strong>: the detail message from the cause is not * automatically incorporated into the resulting detail message of * this exception. * </p> * * @param message the detail message, which should give the reason for * this exception being thrown. * @param cause the cause of this exception, or null if the cause * is unknown. * @since 1.5 */ public SecurityException(String message, Throwable cause) { super(message, cause); } /** * <p> * Constructs a <code>SecurityException</code> using * the specified cause <code>Throwable</code>, which may be used * to provide additional history, with regards to the root of the * problem. It is perfectly valid for this to be null, if the * cause of the problem is unknown. * </p> * <p> * The detail message is automatically constructed from the detail * message of the supplied causal exception. If the cause is null, * then the detail message will also be null. Otherwise, the detail * message of this exception will be that of the causal exception. * This makes this constructor very useful for simply wrapping another * exception. * </p> * * @param cause the cause of this exception, or null if the cause * is unknown. * @since 1.5 */ public SecurityException(Throwable cause) { super(cause); } } 1.1 jop/java/target/src/jdk11/java/lang/Short.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/Short.java?rev=1.1&content-type=text/x-cvsweb-markup Index: Short.java =================================================================== /* Short.java -- object wrapper for short Copyright (C) 1998, 2001, 2002, 2005 Free Software Foundation, Inc. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.lang; /** * Instances of class <code>Short</code> represent primitive * <code>short</code> values. * * Additionally, this class provides various helper functions and variables * related to shorts. * * @author Paul Fisher * @author John Keiser * @author Eric Blake (ebb9@e...) * @since 1.1 * @status updated to 1.4 */ public final class Short { /** * Compatible with JDK 1.1+. */ private static final long serialVersionUID = 7515723908773894738L; /** * The minimum value a <code>short</code> can represent is -32768 (or -2<sup>15</sup>). */ public static final short MIN_VALUE = -32768; /** * The minimum value a <code>short</code> can represent is 32767 (or 2<sup>15</sup>). */ public static final short MAX_VALUE = 32767; /** * The primitive type <code>short</code> is represented by this * <code>Class</code> object. */ // public static final Class TYPE = VMClassLoader.getPrimitiveClass('S'); /** * The number of bits needed to represent a <code>short</code>. * * @since 1.5 */ public static final int SIZE = 16; // This caches some Short values, and is used by boxing conversions // via valueOf(). We must cache at least -128..127; these constants // control how much we actually cache. /** * The immutable value of this Short. * * @serial the wrapped short */ private final short value; public Short(short value) { this.value = value; } public Short(String s) { value = parseShort(s, 10); } public boolean equals(Object obj) { // TODO: instance of not implemented // return obj instanceof Short && value == ((Short) obj).value; return value == ((Short) obj).value; } public int hashCode() { return value; } public static short parseShort(String s) { return parseShort(s, 10); } public static short parseShort(String s, int radix) { int i = Integer.parseInt(s, radix); if ((short) i != i) throw new NumberFormatException(); return (short) i; } /** * Return the value of this <code>Short</code>. * * @return the short value */ public short shortValue() { return value; } /** * Converts the <code>Short</code> value to a <code>String</code> and * assumes a radix of 10. * * @return the <code>String</code> representation of this * <code>Short</code> */ public String toString() { return Integer.toString((int)value,10); // return String.valueOf(value); } } 1.1 jop/java/target/src/jdk11/java/lang/Thread.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/Thread.java?rev=1.1&content-type=text/x-cvsweb-markup Index: Thread.java =================================================================== /** * Thread.java (only for EmbeddedCoffeinMark) */ package java.lang; public class Thread implements Runnable { public final static int MIN_PRIORITY = 1; public final static int NORM_PRIORITY = 5; public final static int MAX_PRIORITY = 10; public static void yield() { ; // do nothing } public void run() { ; // do nothing } public static void sleep(long l) { int tim = (int) l; joprt.RtThread.sleepMs(tim); } } 1.1 jop/java/target/src/jdk11/java/lang/VirtualMachineError.java http://www.opencores.org/cvsweb.shtml/jop/java/target/src/jdk11/java/lang/VirtualMachineError.java?rev=1.1&content-type=text/x-cvsweb-markup Index: VirtualMachineError.java =================================================================== /* VirtualMachineError.java -- thrown when the Virtual Machine has a problem Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package java.lang; /** * A <code>VirtualMachineError</code> or its subclasses are thrown to * indicate there is something wrong with the Java Virtual Machine or that * it does not have the resources needed for it to continue execution. * * @author Brian Jones * @author Tom Tromey (tromey@c...) * @status updated to 1.4 */ public abstract class VirtualMachineError extends Error { /** * Compatible with JDK 1.0+. */ private static final long serialVersionUID = 4161983926571568670L; /** * Create an error without a message. */ public VirtualMachineError() { } /** * Create an error with a message. * * @param s the message */ public VirtualMachineError(String s) { super(s); } }

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.