[armedbear-cvs] r13442 - trunk/abcl/src/org/armedbear/lisp

ehuelsmann at common-lisp.net ehuelsmann at common-lisp.net
Fri Aug 5 21:51:28 UTC 2011


Author: ehuelsmann
Date: Fri Aug  5 14:51:28 2011
New Revision: 13442

Log:
Remove .toString() methods which override default Java output to be 'lispy';
we have princToString() for that now...

Modified:
   trunk/abcl/src/org/armedbear/lisp/ByteArrayInputStream.java
   trunk/abcl/src/org/armedbear/lisp/ByteArrayOutputStream.java
   trunk/abcl/src/org/armedbear/lisp/EchoStream.java
   trunk/abcl/src/org/armedbear/lisp/Nil.java
   trunk/abcl/src/org/armedbear/lisp/NilVector.java
   trunk/abcl/src/org/armedbear/lisp/Package.java
   trunk/abcl/src/org/armedbear/lisp/Pathname.java
   trunk/abcl/src/org/armedbear/lisp/Readtable.java
   trunk/abcl/src/org/armedbear/lisp/SlimeInputStream.java
   trunk/abcl/src/org/armedbear/lisp/SlimeOutputStream.java
   trunk/abcl/src/org/armedbear/lisp/SocketStream.java
   trunk/abcl/src/org/armedbear/lisp/Stream.java
   trunk/abcl/src/org/armedbear/lisp/StringInputStream.java
   trunk/abcl/src/org/armedbear/lisp/StringOutputStream.java
   trunk/abcl/src/org/armedbear/lisp/Symbol.java

Modified: trunk/abcl/src/org/armedbear/lisp/ByteArrayInputStream.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/ByteArrayInputStream.java	Fri Aug  5 14:47:44 2011	(r13441)
+++ trunk/abcl/src/org/armedbear/lisp/ByteArrayInputStream.java	Fri Aug  5 14:51:28 2011	(r13442)
@@ -69,12 +69,6 @@
         return super.typep(type); //TODO
     }
 
-    @Override
-    public String toString()
-    {
-        return unreadableString("BYTE-ARRAY-INPUT-STREAM");
-    }
-
     // ### %make-byte-array-input-stream
     // %make-byte-array-input-stream bytes &optional element-type => byte-array-input-stream
     private static final Primitive MAKE_BYTE_ARRAY_INPUT_STREAM =

Modified: trunk/abcl/src/org/armedbear/lisp/ByteArrayOutputStream.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/ByteArrayOutputStream.java	Fri Aug  5 14:47:44 2011	(r13441)
+++ trunk/abcl/src/org/armedbear/lisp/ByteArrayOutputStream.java	Fri Aug  5 14:51:28 2011	(r13442)
@@ -92,12 +92,6 @@
 	}
     }
 
-    @Override
-    public String toString()
-    {
-        return unreadableString("BYTE-ARRAY-OUTPUT-STREAM");
-    }
-
     // ### %make-byte-array-output-stream
     // %make-byte-array-output-stream &optional element-type => byte-array-output-stream
     private static final Primitive MAKE_BYTE_ARRAY_OUTPUT_STREAM =

Modified: trunk/abcl/src/org/armedbear/lisp/EchoStream.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/EchoStream.java	Fri Aug  5 14:47:44 2011	(r13441)
+++ trunk/abcl/src/org/armedbear/lisp/EchoStream.java	Fri Aug  5 14:51:28 2011	(r13442)
@@ -239,12 +239,6 @@
         return out.freshLine();
     }
 
-    @Override
-    public String toString()
-    {
-        return unreadableString("ECHO-STREAM");
-    }
-
     // ### make-echo-stream
     // input-stream output-stream => echo-stream
     private static final Primitive MAKE_ECHO_STREAM =

Modified: trunk/abcl/src/org/armedbear/lisp/Nil.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Nil.java	Fri Aug  5 14:47:44 2011	(r13441)
+++ trunk/abcl/src/org/armedbear/lisp/Nil.java	Fri Aug  5 14:51:28 2011	(r13442)
@@ -157,14 +157,6 @@
         return null;
     }
 
-    @Override
-    public String toString()
-    {
-        if (Symbol.PRINT_READABLY.symbolValueNoThrow() != NIL)
-            return "|COMMON-LISP|::|NIL|";
-        return "NIL";
-    }
-
     public Object readResolve() throws java.io.ObjectStreamException {
        return NIL;
     }

Modified: trunk/abcl/src/org/armedbear/lisp/NilVector.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/NilVector.java	Fri Aug  5 14:47:44 2011	(r13441)
+++ trunk/abcl/src/org/armedbear/lisp/NilVector.java	Fri Aug  5 14:51:28 2011	(r13442)
@@ -237,12 +237,6 @@
     }
 
     @Override
-    public String toString()
-    {
-        return unreadableString("NIL-VECTOR");
-    }
-
-    @Override
     public int sxhash()
     {
         return 0;

Modified: trunk/abcl/src/org/armedbear/lisp/Package.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Package.java	Fri Aug  5 14:47:44 2011	(r13441)
+++ trunk/abcl/src/org/armedbear/lisp/Package.java	Fri Aug  5 14:51:28 2011	(r13442)
@@ -853,19 +853,15 @@
             sb.append(name);
             sb.append("\")");
             return sb.toString();
-        } else
-            return toString();
-    }
-    
-    @Override
-    public String toString() {
-         if (name != null) {
-            StringBuilder sb = new StringBuilder("#<PACKAGE \"");
-            sb.append(name);
-            sb.append("\">");
-            return sb.toString();
-        } else
-            return unreadableString("PACKAGE");
+        } else {
+             if (name != null) {
+                StringBuilder sb = new StringBuilder("#<PACKAGE \"");
+                sb.append(name);
+                sb.append("\">");
+                return sb.toString();
+            } else
+                return unreadableString("PACKAGE");
+        }
     }
 
     public Object readResolve() throws java.io.ObjectStreamException {

Modified: trunk/abcl/src/org/armedbear/lisp/Pathname.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Pathname.java	Fri Aug  5 14:47:44 2011	(r13441)
+++ trunk/abcl/src/org/armedbear/lisp/Pathname.java	Fri Aug  5 14:51:28 2011	(r13442)
@@ -2513,10 +2513,6 @@
         }
     }
     
-    public String toString() {
-        return getNamestring();
-    }
-
     public URL toURL() {
         try {
             if (isURL()) {

Modified: trunk/abcl/src/org/armedbear/lisp/Readtable.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Readtable.java	Fri Aug  5 14:47:44 2011	(r13441)
+++ trunk/abcl/src/org/armedbear/lisp/Readtable.java	Fri Aug  5 14:51:28 2011	(r13442)
@@ -192,12 +192,6 @@
     return super.typep(type);
   }
 
-  @Override
-  public final String toString()
-  {
-    return unreadableString("READTABLE");
-  }
-
   public final LispObject getReadtableCase()
   {
     return readtableCase;

Modified: trunk/abcl/src/org/armedbear/lisp/SlimeInputStream.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/SlimeInputStream.java	Fri Aug  5 14:47:44 2011	(r13441)
+++ trunk/abcl/src/org/armedbear/lisp/SlimeInputStream.java	Fri Aug  5 14:51:28 2011	(r13442)
@@ -138,13 +138,6 @@
         lineNumber = 0;
     }
 
-
-    @Override
-    public String toString()
-    {
-        return unreadableString("SLIME-INPUT-STREAM");
-    }
-
     // ### make-slime-input-stream
     // make-slime-input-stream function output-stream => slime-input-stream
     private static final Primitive MAKE_SLIME_INPUT_STREAM =

Modified: trunk/abcl/src/org/armedbear/lisp/SlimeOutputStream.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/SlimeOutputStream.java	Fri Aug  5 14:47:44 2011	(r13441)
+++ trunk/abcl/src/org/armedbear/lisp/SlimeOutputStream.java	Fri Aug  5 14:51:28 2011	(r13442)
@@ -137,12 +137,6 @@
         }
     }
 
-    @Override
-    public String toString()
-    {
-        return unreadableString("SLIME-OUTPUT-STREAM");
-    }
-
     // ### %make-slime-output-stream
     // %make-slime-output-stream function => stream
     private static final Primitive MAKE_SLIME_OUTPUT_STREAM =

Modified: trunk/abcl/src/org/armedbear/lisp/SocketStream.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/SocketStream.java	Fri Aug  5 14:47:44 2011	(r13441)
+++ trunk/abcl/src/org/armedbear/lisp/SocketStream.java	Fri Aug  5 14:51:28 2011	(r13442)
@@ -80,10 +80,4 @@
 	    return error(new LispError(e.getMessage()));
 	}
     }
-
-    @Override
-    public String toString()
-    {
-        return unreadableString("SOCKET-STREAM");
-    }
 }

Modified: trunk/abcl/src/org/armedbear/lisp/Stream.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Stream.java	Fri Aug  5 14:47:44 2011	(r13441)
+++ trunk/abcl/src/org/armedbear/lisp/Stream.java	Fri Aug  5 14:51:28 2011	(r13442)
@@ -1576,11 +1576,6 @@
         return T;
     }
 
-    @Override
-    public String toString() {
-        return unreadableString("STREAM");
-    }
-
     // read-byte stream &optional eof-error-p eof-value => byte
     // Reads an 8-bit byte.
     public LispObject readByte(boolean eofError, LispObject eofValue)

Modified: trunk/abcl/src/org/armedbear/lisp/StringInputStream.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/StringInputStream.java	Fri Aug  5 14:47:44 2011	(r13441)
+++ trunk/abcl/src/org/armedbear/lisp/StringInputStream.java	Fri Aug  5 14:51:28 2011	(r13442)
@@ -92,12 +92,6 @@
     }
 
     @Override
-    public String toString()
-    {
-        return unreadableString("STRING-INPUT-STREAM");
-    }
-
-    @Override
     public int getOffset() {
         return start + super.getOffset();
     }

Modified: trunk/abcl/src/org/armedbear/lisp/StringOutputStream.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/StringOutputStream.java	Fri Aug  5 14:47:44 2011	(r13441)
+++ trunk/abcl/src/org/armedbear/lisp/StringOutputStream.java	Fri Aug  5 14:51:28 2011	(r13442)
@@ -98,12 +98,6 @@
         return s;
     }
 
-    @Override
-    public String toString()
-    {
-        return unreadableString("STRING-OUTPUT-STREAM");
-    }
-
     // ### %make-string-output-stream
     // %make-string-output-stream element-type => string-stream
     private static final Primitive MAKE_STRING_OUTPUT_STREAM =

Modified: trunk/abcl/src/org/armedbear/lisp/Symbol.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Symbol.java	Fri Aug  5 14:47:44 2011	(r13441)
+++ trunk/abcl/src/org/armedbear/lisp/Symbol.java	Fri Aug  5 14:51:28 2011	(r13442)
@@ -271,11 +271,6 @@
     return sb.toString();
   }
 
-  @Override
-  public String toString() {
-      return getQualifiedName();
-  }
-
   /** Gets the value associated with the symbol
    * as set by SYMBOL-VALUE.
    *




More information about the armedbear-cvs mailing list