Changeset 14983


Ignore:
Timestamp:
03/28/17 14:05:12 (5 years ago)
Author:
Mark Evenson
Message:

Normalize JAVA:DESCRIBE-JAVA-OBJECT static primitive linkage

File:
1 edited

Legend:

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

    r14979 r14983  
    600600    }
    601601
    602     // ### describe-java-object
    603     private static final Primitive DESCRIBE_JAVA_OBJECT =
    604         new Primitive("describe-java-object", PACKAGE_JAVA, true)
    605     {
    606         @Override
    607         public LispObject execute(LispObject first, LispObject second)
    608 
    609         {
    610             if (!(first instanceof JavaObject))
    611                 return type_error(first, Symbol.JAVA_OBJECT);
    612             final Stream stream = checkStream(second);
    613             final JavaObject javaObject = (JavaObject) first;
    614             stream._writeString(describeJavaObject(javaObject));
    615             return LispThread.currentThread().nothing();
    616         }
    617     };
     602  private static final Primitive DESCRIBE_JAVA_OBJECT
     603    = new pf_describe_java_object();
     604  @DocString(name="describe-java-object",
     605       args="object stream",
     606       doc="Print a human friendly description of Java OBJECT to STREAM.")
     607  private static final class pf_describe_java_object extends Primitive
     608  {
     609    pf_describe_java_object() {
     610      super("describe-java-object", PACKAGE_JAVA, true);
     611    }
     612    @Override
     613    public LispObject execute(LispObject first, LispObject second) {
     614      if (!(first instanceof JavaObject))
     615  return type_error(first, Symbol.JAVA_OBJECT);
     616      final Stream stream = checkStream(second);
     617      final JavaObject javaObject = (JavaObject) first;
     618      stream._writeString(describeJavaObject(javaObject));
     619      return LispThread.currentThread().nothing();
     620    }
     621  };
    618622
    619623    //JAVA-CLASS support
Note: See TracChangeset for help on using the changeset viewer.