[kaffe] CVS kaffe (dalibor): Resynced with GNU Classpath

Kaffe CVS Kaffe Mailing List <kaffe@kaffe.org>
Mon Feb 2 09:09:01 2004


PatchSet 4385 
Date: 2004/02/02 16:52:03
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath

2004-02-02  Dalibor Topic <robilad@kaffe.org>

        Resynced with GNU Classpath.

        2004-01-25  Michael Koch  <konqueror@gmx.de>

        * gnu/java/lang/ClassHelper.java
        (getPackagePortion): Moved to java.lang.Class.
        * java/lang/Class.java: Merged more with libgcj, renamed some
        variables.
        (toString): Moved.
        (getPackagePortion): New method.

Members: 
	ChangeLog:1.1969->1.1970 
	libraries/javalib/gnu/java/lang/ClassHelper.java:1.2->1.3 
	libraries/javalib/java/lang/Class.java:1.47->1.48 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1969 kaffe/ChangeLog:1.1970
--- kaffe/ChangeLog:1.1969	Mon Feb  2 16:26:01 2004
+++ kaffe/ChangeLog	Mon Feb  2 16:52:03 2004
@@ -1,5 +1,18 @@
 2004-02-02  Dalibor Topic <robilad@kaffe.org>
 
+	Resynced with GNU Classpath.
+
+	2004-01-25  Michael Koch  <konqueror@gmx.de>
+
+        * gnu/java/lang/ClassHelper.java
+        (getPackagePortion): Moved to java.lang.Class.
+        * java/lang/Class.java: Merged more with libgcj, renamed some
+        variables.
+        (toString): Moved.
+        (getPackagePortion): New method.
+
+2004-02-02  Dalibor Topic <robilad@kaffe.org>
+
 	* Makefile.am:
 	(SUBDIRS) Removed intl.
 
Index: kaffe/libraries/javalib/gnu/java/lang/ClassHelper.java
diff -u kaffe/libraries/javalib/gnu/java/lang/ClassHelper.java:1.2 kaffe/libraries/javalib/gnu/java/lang/ClassHelper.java:1.3
--- kaffe/libraries/javalib/gnu/java/lang/ClassHelper.java:1.2	Wed Oct 22 10:34:47 2003
+++ kaffe/libraries/javalib/gnu/java/lang/ClassHelper.java	Mon Feb  2 16:52:06 2004
@@ -75,20 +75,6 @@
     return name.substring(lastInd + 1);
   }
 
-  /**
-   * Strip the last portion of the name (after the last dot).
-   *
-   * @param name the name to get package of
-   * @return the package name, or "" if no package
-   */
-  public static String getPackagePortion(String name)
-  {
-    int lastInd = name.lastIndexOf('.');
-    if (lastInd == -1)
-      return "";
-    return name.substring(0, lastInd);
-  }
-
   /** Cache of methods found in getAllMethods(). */
   private static Map allMethods = new HashMap();
 
Index: kaffe/libraries/javalib/java/lang/Class.java
diff -u kaffe/libraries/javalib/java/lang/Class.java:1.47 kaffe/libraries/javalib/java/lang/Class.java:1.48
--- kaffe/libraries/javalib/java/lang/Class.java:1.47	Wed Aug 27 20:07:26 2003
+++ kaffe/libraries/javalib/java/lang/Class.java	Mon Feb  2 16:52:06 2004
@@ -437,13 +437,33 @@
     }
 }
 
-/*
- * toString()
- */
-public String toString() {
-	return (isInterface() ? "interface " : isPrimitive() ? "" : "class ")
-	    + getName();
-}
+  /**
+   * Strip the last portion of the name (after the last dot).
+   *
+   * @param name the name to get package of
+   * @return the package name, or "" if no package
+   */
+  private static String getPackagePortion(String name)
+  {
+    int lastInd = name.lastIndexOf('.');
+    if (lastInd == -1)
+      return "";
+    return name.substring(0, lastInd);
+  }
+
+  /**
+   * Return the human-readable form of this Object.  For an object, this
+   * is either "interface " or "class " followed by <code>getName()</code>,
+   * for primitive types and void it is just <code>getName()</code>.
+   *
+   * @return the human-readable form of this Object
+   */
+  public String toString()
+  {
+    if (isPrimitive())
+      return getName();
+    return (isInterface() ? "interface " : "class ") + getName();
+  }
 
 /**
  * Returns the desired assertion status of this class, if it were to be
@@ -505,19 +525,5 @@
 			return status.equals(Boolean.TRUE);
 	}
 	return c.defaultAssertionStatus;
-}
-
-/**
- * Strip the last portion of the name (after the last dot).
- *
- * @param name the name to get package of
- * @return the package name, or "" if no package
- */
-private static String getPackagePortion(String name)
-{
-	int lastInd = name.lastIndexOf('.');
-	if (lastInd == -1)
-		return "";
-	return name.substring(0, lastInd);
 }
 }