Changeset 13444


Ignore:
Timestamp:
08/06/11 13:51:26 (10 years ago)
Author:
ehuelsmann
Message:

Reduce the number of required unreadableString() methods by removing
the ones taking a symbol argument: all invocations involved a constant
parameter, now replaced with a constant string instead.

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/EndOfFile.java

    r12512 r13444  
    7575    public String getMessage()
    7676    {
    77         return unreadableString(Symbol.END_OF_FILE);
     77        return unreadableString("END-OF-STREAM");
    7878    }
    7979}
  • trunk/abcl/src/org/armedbear/lisp/Environment.java

    r13440 r13444  
    248248  public String printObject()
    249249  {
    250     return unreadableString(Symbol.ENVIRONMENT);
     250    return unreadableString("ENVIRONMENT");
    251251  }
    252252
  • trunk/abcl/src/org/armedbear/lisp/FileStream.java

    r13440 r13444  
    266266    public String printObject()
    267267    {
    268         return unreadableString(Symbol.FILE_STREAM);
     268        return unreadableString("FILE-STREAM");
    269269    }
    270270
  • trunk/abcl/src/org/armedbear/lisp/Layout.java

    r13440 r13444  
    138138  public String printObject()
    139139  {
    140     return unreadableString(Symbol.LAYOUT);
     140    return unreadableString("LAYOUT");
    141141  }
    142142
  • trunk/abcl/src/org/armedbear/lisp/LispObject.java

    r13440 r13444  
    755755  }
    756756
     757  /** Calls unreadableString(String s, boolean identity) with a default
     758   * identity value of 'true'.
     759   *
     760   * @param s String representation of this object.
     761   * @return String enclosed in the non-readable #< ... > markers
     762   */
    757763  public final String unreadableString(String s) {
    758764     return unreadableString(s, true);
    759765  }
    760   public final String unreadableString(Symbol sym) {
    761      return unreadableString(sym, true);
    762   }
    763 
     766
     767  /** Creates a non-readably (as per CLHS terminology) representation
     768   * of the 'this' object, using string 's'.
     769   *
     770   * If the current value of the variable *PRINT-READABLY* is T, a
     771   * Lisp error is thrown and no value is returned.
     772   *
     773   * @param s
     774   * @param identity when 'true', includes Java's identityHash for the object
     775   *            in the output.
     776   * @return a non reabable string (i.e. one enclosed in the #< > markers)
     777   */
    764778  public final String unreadableString(String s, boolean identity)
    765779  {
     
    773787    sb.append(">");
    774788    return sb.toString();
    775   }
    776 
    777   public final String unreadableString(Symbol symbol, boolean identity)
    778 
    779   {
    780     return unreadableString(symbol.printObject(), identity);
    781789  }
    782790
  • trunk/abcl/src/org/armedbear/lisp/RandomState.java

    r13440 r13444  
    9494    public String printObject()
    9595    {
    96         return unreadableString(Symbol.RANDOM_STATE);
     96        return unreadableString("RANDOM-STATE");
    9797    }
    9898
  • trunk/abcl/src/org/armedbear/lisp/TwoWayStream.java

    r13440 r13444  
    217217    public String printObject()
    218218    {
    219         return unreadableString(Symbol.TWO_WAY_STREAM);
     219        return unreadableString("TWO-WAY-STREAM");
    220220    }
    221221
Note: See TracChangeset for help on using the changeset viewer.