[armedbear-cvs] r13608 - trunk/abcl/src/org/armedbear/lisp
mevenson at common-lisp.net
mevenson at common-lisp.net
Fri Sep 30 14:18:05 UTC 2011
Author: mevenson
Date: Fri Sep 30 07:18:04 2011
New Revision: 13608
Log:
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.
Modified:
trunk/abcl/src/org/armedbear/lisp/JavaObject.java
trunk/abcl/src/org/armedbear/lisp/java.lisp
Modified: trunk/abcl/src/org/armedbear/lisp/JavaObject.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/JavaObject.java Fri Sep 30 07:17:55 2011 (r13607)
+++ trunk/abcl/src/org/armedbear/lisp/JavaObject.java Fri Sep 30 07:18:04 2011 (r13608)
@@ -659,10 +659,26 @@
};
+ // ### +null+
public final static Symbol NULL
= Lisp.exportConstant("+NULL+", PACKAGE_JAVA, new JavaObject(null));
+ static {
+ String doc = "The JVM null object reference.";
+ NULL.setDocumentation(Symbol.VARIABLE, new SimpleString(doc));
+ }
+ // ### +true+
public final static Symbol TRUE
= Lisp.exportConstant("+TRUE+", PACKAGE_JAVA, new JavaObject(true));
+ static {
+ String doc = "The JVM primitive value for boolean true.";
+ TRUE.setDocumentation(Symbol.VARIABLE, new SimpleString(doc));
+ }
+ // ### +false+
public final static Symbol FALSE
= Lisp.exportConstant("+FALSE+", PACKAGE_JAVA, new JavaObject(false));
+ static {
+ String doc = "The JVM primitive value for boolean false.";
+ FALSE.setDocumentation(Symbol.VARIABLE, new SimpleString(doc));
+ }
+
}
Modified: trunk/abcl/src/org/armedbear/lisp/java.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/java.lisp Fri Sep 30 07:17:55 2011 (r13607)
+++ trunk/abcl/src/org/armedbear/lisp/java.lisp Fri Sep 30 07:18:04 2011 (r13608)
@@ -43,7 +43,11 @@
(dolist (url urls)
(add-url-to-classpath url)))
-(defgeneric add-to-classpath (jar-or-jars &optional classloader))
+(defgeneric add-to-classpath (jar-or-jars &optional classloader)
+ (:documentation "Add JAR-OR-JARS to the JVM classpath optionally specifying the CLASSLOADER to add.
+
+JAR-OR-JARS is either a pathname designating a jar archive or the root
+directory to search for classes or a list of such values."))
(defmethod add-to-classpath (jar-or-jars &optional (classloader (get-current-classloader)))
(%add-to-classpath jar-or-jars classloader))
More information about the armedbear-cvs
mailing list