Changeset 13608


Ignore:
Timestamp:
09/30/11 14:18:04 (12 years ago)
Author:
Mark Evenson
Message:

Fill in some missing docstrings from JAVA package.

Unfortunately, we have to use static initializers and retain the '###'
marker for documenting package variables as we don't seem to be able
to use the @DocString? annotation as the JVM reflection APIs only seem
to require that we know the Java class that a field is part of in
order to look up runtime annotations. If this understanding is
faulty, please let me know otherwise how to do it.

The :DOCUMENTATION option for the DEFGENERIC is apparently not
working.

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

Legend:

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

    r13440 r13608  
    660660        };
    661661
     662    // ### +null+
    662663    public final static Symbol NULL
    663664        = Lisp.exportConstant("+NULL+", PACKAGE_JAVA, new JavaObject(null));
     665    static {
     666        String doc = "The JVM null object reference.";
     667        NULL.setDocumentation(Symbol.VARIABLE, new SimpleString(doc));
     668    }
     669    // ### +true+
    664670    public final static Symbol TRUE
    665671        = Lisp.exportConstant("+TRUE+", PACKAGE_JAVA, new JavaObject(true));
     672    static {
     673        String doc = "The JVM primitive value for boolean true.";
     674        TRUE.setDocumentation(Symbol.VARIABLE, new SimpleString(doc));
     675    }
     676    // ### +false+
    666677    public final static Symbol FALSE
    667678        = Lisp.exportConstant("+FALSE+", PACKAGE_JAVA, new JavaObject(false));
     679    static {
     680        String doc = "The JVM primitive value for boolean false.";
     681        FALSE.setDocumentation(Symbol.VARIABLE, new SimpleString(doc));
     682    }
     683
    668684}
  • trunk/abcl/src/org/armedbear/lisp/java.lisp

    r13393 r13608  
    4444    (add-url-to-classpath url)))
    4545
    46 (defgeneric add-to-classpath (jar-or-jars &optional classloader))
     46(defgeneric add-to-classpath (jar-or-jars &optional classloader)
     47  (:documentation "Add JAR-OR-JARS to the JVM classpath optionally specifying the CLASSLOADER to add.
     48
     49JAR-OR-JARS is either a pathname designating a jar archive or the root
     50directory to search for classes or a list of such values."))
    4751
    4852(defmethod add-to-classpath (jar-or-jars &optional (classloader (get-current-classloader)))
Note: See TracChangeset for help on using the changeset viewer.