Remove .toString() methods which override default Java output to be 'lispy';

we have princToString() for that now...
parent 4be1c304
......@@ -69,12 +69,6 @@ public final class ByteArrayInputStream extends Stream
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 =
......
......@@ -92,12 +92,6 @@ public final class ByteArrayOutputStream extends Stream
}
}
@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 =
......
......@@ -239,12 +239,6 @@ public final class EchoStream extends Stream
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 =
......
......@@ -157,14 +157,6 @@ public final class Nil extends Symbol
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;
}
......
......@@ -236,12 +236,6 @@ public final class NilVector extends AbstractString
error(new TypeError(String.valueOf(obj) + " is not of type NIL."));
}
@Override
public String toString()
{
return unreadableString("NIL-VECTOR");
}
@Override
public int sxhash()
{
......
......@@ -853,19 +853,15 @@ public final class Package extends LispObject implements java.io.Serializable
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 {
......
......@@ -2513,10 +2513,6 @@ public class Pathname extends LispObject {
}
}
public String toString() {
return getNamestring();
}
public URL toURL() {
try {
if (isURL()) {
......
......@@ -192,12 +192,6 @@ public class Readtable extends LispObject
return super.typep(type);
}
@Override
public final String toString()
{
return unreadableString("READTABLE");
}
public final LispObject getReadtableCase()
{
return readtableCase;
......
......@@ -138,13 +138,6 @@ public class SlimeInputStream extends Stream
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 =
......
......@@ -137,12 +137,6 @@ public final class SlimeOutputStream extends Stream
}
}
@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 =
......
......@@ -80,10 +80,4 @@ public final class SocketStream extends TwoWayStream
return error(new LispError(e.getMessage()));
}
}
@Override
public String toString()
{
return unreadableString("SOCKET-STREAM");
}
}
......@@ -1576,11 +1576,6 @@ public class Stream extends StructureObject {
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)
......
......@@ -91,12 +91,6 @@ public final class StringInputStream extends Stream
return super.typep(type);
}
@Override
public String toString()
{
return unreadableString("STRING-INPUT-STREAM");
}
@Override
public int getOffset() {
return start + super.getOffset();
......
......@@ -98,12 +98,6 @@ public final class StringOutputStream extends Stream
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 =
......
......@@ -271,11 +271,6 @@ public class Symbol extends LispObject implements java.io.Serializable
return sb.toString();
}
@Override
public String toString() {
return getQualifiedName();
}
/** Gets the value associated with the symbol
* as set by SYMBOL-VALUE.
*
......
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