Changeset 12826
- Timestamp:
- 07/25/10 19:09:13 (13 years ago)
- Location:
- trunk/abcl
- Files:
-
- 1 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/build.xml
r12808 r12826 450 450 <arg value="--append"/> 451 451 <arg value="--regex=|[ \t]+//[ \t]+###[ \t]+\([^ \t]+\)|\1|"/> 452 <arg value='--regex=|[ \t]*@DocString([ \t]*name=\"\([^\"]*\)|\1|'/> 452 453 <fileset dir="${src.dir}"> 453 454 <patternset refid="abcl.source.java"/> -
trunk/abcl/src/org/armedbear/lisp/ForwardReferencedClass.java
r12481 r12826 77 77 } 78 78 79 // ### make-forward-referenced-class79 @DocString(name="make-forward-referenced=class") 80 80 private static final Primitive MAKE_FORWARD_REFERENCED_CLASS = 81 81 new Primitive("make-forward-referenced-class", PACKAGE_SYS, true) -
trunk/abcl/src/org/armedbear/lisp/Function.java
r12771 r12826 54 54 public Function(String name) 55 55 { 56 this(); 56 this(name, (String)null); 57 } 58 59 public Function(String name, String arglist) 60 { 61 this(); 62 if(arglist != null) 63 setLambdaList(new SimpleString(arglist)); 57 64 if (name != null) { 58 65 Symbol symbol = Symbol.addFunction(name.toUpperCase(), this); … … 63 70 } 64 71 72 public Function(Symbol symbol) 73 { 74 this(symbol, null, null); 75 } 76 65 77 public Function(Symbol symbol, String arglist) 78 { 79 this(symbol, arglist, null); 80 } 81 82 public Function(Symbol symbol, String arglist, String docstring) 66 83 { 67 84 this(); … … 70 87 symbol.setBuiltInFunction(true); 71 88 setLambdaName(symbol); 72 setLambdaList(new SimpleString(arglist)); 73 } 74 75 public Function(Symbol symbol, String arglist, String docstring) 76 { 77 this(); 78 symbol.setSymbolFunction(this); 79 if (cold) 80 symbol.setBuiltInFunction(true); 81 setLambdaName(symbol); 82 setLambdaList(new SimpleString(arglist)); 83 if (docstring != null) { 89 if(arglist != null) 90 setLambdaList(new SimpleString(arglist)); 91 if (docstring != null) 84 92 symbol.setDocumentation(Symbol.FUNCTION, 85 93 new SimpleString(docstring)); 86 }87 }88 89 public Function(String name, String arglist)90 {91 this(name);92 setLambdaList(new SimpleString(arglist));93 94 } 94 95 -
trunk/abcl/src/org/armedbear/lisp/Java.java
r12814 r12826 61 61 62 62 private static final Primitive ENSURE_JAVA_OBJECT = new pf_ensure_java_object(); 63 @DocString(name="ensure-java-object", args="obj", 64 doc="Ensures OBJ is wrapped in a JAVA-OBJECT, wrapping it if necessary.") 63 65 private static final class pf_ensure_java_object extends Primitive 64 66 { 65 67 pf_ensure_java_object() 66 68 { 67 super("ensure-java-object", PACKAGE_JAVA, true , "obj");69 super("ensure-java-object", PACKAGE_JAVA, true); 68 70 } 69 71 … … 74 76 }; 75 77 76 // ### register-java-exception exception-name condition-symbol => T77 78 private static final Primitive REGISTER_JAVA_EXCEPTION = new pf_register_java_exception(); 79 @DocString(name="register-java-exception", // => T 80 args="exception-name condition-symbol", 81 doc="Registers the Java Throwable named by the symbol EXCEPTION-NAME as the condition " + 82 "designated by CONDITION-SYMBOL. Returns T if successful, NIL if not.") 78 83 private static final class pf_register_java_exception extends Primitive 79 84 { 80 85 pf_register_java_exception() 81 86 { 82 super("register-java-exception", PACKAGE_JAVA, true, 83 "exception-name condition-symbol"); 87 super("register-java-exception", PACKAGE_JAVA, true); 84 88 } 85 89 … … 99 103 }; 100 104 101 // ### unregister-java-exception exception-name => T or NIL102 105 private static final Primitive UNREGISTER_JAVA_EXCEPTION = new pf_unregister_java_exception(); 106 @DocString(name="unregister-java-exception", args="exception-name", 107 doc="Unregisters the Java Throwable EXCEPTION-NAME previously registered" + 108 " by REGISTER-JAVA-EXCEPTION.") 103 109 private static final class pf_unregister_java_exception extends Primitive 104 110 { 105 111 pf_unregister_java_exception() 106 112 { 107 super("unregister-java-exception", PACKAGE_JAVA, true, 108 "exception-name"); 113 super("unregister-java-exception", PACKAGE_JAVA, true); 109 114 } 110 115 … … 130 135 } 131 136 132 // ### jclass name-or-class-ref &optional class-loader => class-ref133 137 private static final Primitive JCLASS = new pf_jclass(); 138 @DocString(name="jclass", args="name-or-class-ref &optional class-loader", 139 doc="Returns a reference to the Java class designated by" + 140 " NAME-OR-CLASS-REF. If the CLASS-LOADER parameter is passed, the" + 141 " class is resolved with respect to the given ClassLoader.") 134 142 private static final class pf_jclass extends Primitive 135 143 { … … 137 145 pf_jclass() 138 146 { 139 super(Symbol.JCLASS, "name-or-class-ref &optional class-loader", 140 "Returns a reference to the Java class designated by NAME-OR-CLASS-REF. If the CLASS-LOADER parameter is passed, the class is resolved with respect to the given ClassLoader."); 147 super(Symbol.JCLASS); 141 148 } 142 149 … … 154 161 } 155 162 }; 156 157 // ### jfield - retrieve or modify a field in a Java class or instance.158 //159 // Supported argument patterns:160 //161 // Case 1: class-ref field-name:162 // to retrieve the value of a static field.163 //164 // Case 2: class-ref field-name instance-ref:165 // to retrieve the value of a class field of the instance.166 //167 // Case 3: class-ref field-name primitive-value:168 // to store primitive-value in a static field.169 //170 // Case 4: class-ref field-name instance-ref value:171 // to store value in a class field of the instance.172 //173 // Case 5: class-ref field-name nil value:174 // to store value in a static field (when value may be175 // confused with an instance-ref).176 //177 // Case 6: field-name instance:178 // to retrieve the value of a field of the instance. The179 // class is derived from the instance.180 //181 // Case 7: field-name instance value:182 // to store value in a field of the instance. The class is183 // derived from the instance.184 //185 163 186 164 static final LispObject jfield(Primitive fun, LispObject[] args, boolean translate) … … 259 237 } 260 238 261 // ### jfield class-ref-or-field field-or-instance &optional instance value 239 262 240 private static final Primitive JFIELD = new pf_jfield(); 241 @DocString(name="jfield", 242 args="class-ref-or-field field-or-instance &optional instance value", 243 doc="Retrieves or modifies a field in a Java class or instance.\n\n"+ 244 "Supported argument patterns:\n\n"+ 245 " Case 1: class-ref field-name:\n"+ 246 " Retrieves the value of a static field.\n\n"+ 247 " Case 2: class-ref field-name instance-ref:\n"+ 248 " Retrieves the value of a class field of the instance.\n\n"+ 249 " Case 3: class-ref field-name primitive-value:\n"+ 250 " Stores a primitive-value in a static field.\n\n"+ 251 " Case 4: class-ref field-name instance-ref value:\n"+ 252 " Stores value in a class field of the instance.\n\n"+ 253 " Case 5: class-ref field-name nil value:\n"+ 254 " Stores value in a static field (when value may be\n"+ 255 " confused with an instance-ref).\n\n"+ 256 " Case 6: field-name instance:\n"+ 257 " Retrieves the value of a field of the instance. The\n"+ 258 " class is derived from the instance.\n\n"+ 259 " Case 7: field-name instance value:\n"+ 260 " Stores value in a field of the instance. The class is\n"+ 261 " derived from the instance.\n\n" 262 ) 263 263 private static final class pf_jfield extends Primitive 264 264 { 265 265 pf_jfield() 266 266 { 267 super("jfield", PACKAGE_JAVA, true, 268 "class-ref-or-field field-or-instance &optional instance value"); 267 super("jfield", PACKAGE_JAVA, true); 269 268 } 270 269 … … 276 275 }; 277 276 278 // ### jfield-raw - retrieve or modify a field in a Java class or instance.279 277 private static final Primitive JFIELD_RAW = new pf_jfield_raw(); 278 @DocString(name="jfield", 279 args="class-ref-or-field field-or-instance &optional instance value", 280 doc="Retrieves or modifies a field in a Java class or instance. Does not\n"+ 281 "attempt to coerce its value or the result into a Lisp object.\n\n"+ 282 "Supported argument patterns:\n\n"+ 283 " Case 1: class-ref field-name:\n"+ 284 " Retrieves the value of a static field.\n\n"+ 285 " Case 2: class-ref field-name instance-ref:\n"+ 286 " Retrieves the value of a class field of the instance.\n\n"+ 287 " Case 3: class-ref field-name primitive-value:\n"+ 288 " Stores a primitive-value in a static field.\n\n"+ 289 " Case 4: class-ref field-name instance-ref value:\n"+ 290 " Stores value in a class field of the instance.\n\n"+ 291 " Case 5: class-ref field-name nil value:\n"+ 292 " Stores value in a static field (when value may be\n"+ 293 " confused with an instance-ref).\n\n"+ 294 " Case 6: field-name instance:\n"+ 295 " Retrieves the value of a field of the instance. The\n"+ 296 " class is derived from the instance.\n\n"+ 297 " Case 7: field-name instance value:\n"+ 298 " Stores value in a field of the instance. The class is\n"+ 299 " derived from the instance.\n\n" 300 ) 280 301 private static final class pf_jfield_raw extends Primitive 281 302 { 282 303 pf_jfield_raw() 283 304 { 284 super("jfield-raw", PACKAGE_JAVA, true, 285 "class-ref-or-field field-or-instance &optional instance value"); 305 super("jfield-raw", PACKAGE_JAVA, true); 286 306 } 287 307 … … 293 313 }; 294 314 295 // ### jconstructor class-ref &rest parameter-class-refs296 315 private static final Primitive JCONSTRUCTOR = new pf_jconstructor(); 316 @DocString(name="jconstructor", args="class-ref &rest parameter-class-refs", 317 doc="Returns a reference to the Java constructor of CLASS-REF with the" + 318 " given PARAMETER-CLASS-REFS.") 297 319 private static final class pf_jconstructor extends Primitive 298 320 { 299 321 pf_jconstructor() 300 322 { 301 super("jconstructor", PACKAGE_JAVA, true, 302 "class-ref &rest parameter-class-refs"); 323 super("jconstructor", PACKAGE_JAVA, true); 303 324 } 304 325 … … 343 364 }; 344 365 345 // ### jmethod class-ref name &rest parameter-class-refs346 366 private static final Primitive JMETHOD = new pf_jmethod(); 367 368 @DocString(name="jmethod", args="class-ref method-name &rest parameter-class-refs", 369 doc="Returns a reference to the Java method METHOD-NAME of CLASS-REF with the" + 370 " given PARAMETER-CLASS-REFS.") 347 371 private static final class pf_jmethod extends Primitive 348 372 { 349 373 pf_jmethod() 350 374 { 351 super("jmethod", PACKAGE_JAVA, true, 352 "class-ref name &rest parameter-class-refs"); 375 super("jmethod", PACKAGE_JAVA, true); 353 376 } 354 377 … … 471 494 } 472 495 473 // ### jstatic method class &rest args474 496 private static final Primitive JSTATIC = new pf_jstatic(); 497 @DocString(name="jstatic", args="method class &rest args", 498 doc="Invokes the static method METHOD on class CLASS with ARGS.") 475 499 private static final class pf_jstatic extends Primitive 476 500 { 477 501 pf_jstatic() 478 502 { 479 super("jstatic", PACKAGE_JAVA, true , "method class &rest args");503 super("jstatic", PACKAGE_JAVA, true); 480 504 } 481 505 … … 487 511 }; 488 512 489 // ### jstatic-raw method class &rest args490 513 private static final Primitive JSTATIC_RAW = new pf_jstatic_raw(); 514 @DocString(name="jstatic-raw", args="method class &rest args", 515 doc="Invokes the static method METHOD on class CLASS with ARGS. Does not "+ 516 "attempt to coerce the arguments or result into a Lisp object.") 491 517 private static final class pf_jstatic_raw extends Primitive 492 518 { 493 519 pf_jstatic_raw() 494 520 { 495 super("jstatic-raw", PACKAGE_JAVA, true, 496 "method class &rest args"); 521 super("jstatic-raw", PACKAGE_JAVA, true); 497 522 } 498 523 … … 504 529 }; 505 530 506 // ### jnew constructor &rest args507 531 private static final Primitive JNEW = new pf_jnew(); 532 @DocString(name="jnew", args="constructor &rest args", 533 doc="Invokes the Java constructor CONSTRUCTOR with the arguments ARGS.") 508 534 private static final class pf_jnew extends Primitive 509 535 { 510 536 pf_jnew() 511 537 { 512 super("jnew", PACKAGE_JAVA, true , "constructor &rest args");538 super("jnew", PACKAGE_JAVA, true); 513 539 } 514 540 … … 567 593 }; 568 594 569 // ### jnew-array element-type &rest dimensions570 595 private static final Primitive JNEW_ARRAY = new pf_jnew_array(); 596 @DocString(name="jnew-array", args="element-type &rest dimensions", 597 doc="Creates a new Java array of type ELEMENT-TYPE, with the given" + 598 " DIMENSIONS.") 571 599 private static final class pf_jnew_array extends Primitive 572 600 { 573 601 pf_jnew_array() 574 602 { 575 super("jnew-array", PACKAGE_JAVA, true, 576 "element-type &rest dimensions"); 603 super("jnew-array", PACKAGE_JAVA, true); 577 604 } 578 605 … … 625 652 } 626 653 627 // ### jarray-ref java-array &rest indices628 654 private static final Primitive JARRAY_REF = new pf_jarray_ref(); 655 @DocString(name="jarray-ref", args="java-array &rest indices", 656 doc="Dereferences the Java array JAVA-ARRAY using the given INDICIES, " + 657 "coercing the result into a Lisp object, if possible.") 629 658 private static final class pf_jarray_ref extends Primitive 630 659 { 631 660 pf_jarray_ref() 632 661 { 633 super("jarray-ref", PACKAGE_JAVA, true, 634 "java-array &rest indices"); 662 super("jarray-ref", PACKAGE_JAVA, true); 635 663 } 636 664 … … 642 670 }; 643 671 644 // ### jarray-ref-raw java-array &rest indices645 672 private static final Primitive JARRAY_REF_RAW = new pf_jarray_ref_raw(); 673 @DocString(name="jarray-ref-raw", args="java-array &rest indices", 674 doc="Dereference the Java array JAVA-ARRAY using the given INDICIES. " + 675 "Does not attempt to coerce the result into a Lisp object.") 646 676 private static final class pf_jarray_ref_raw extends Primitive 647 677 { 648 678 pf_jarray_ref_raw() 649 679 { 650 super("jarray-ref-raw", PACKAGE_JAVA, true, 651 "java-array &rest indices"); 680 super("jarray-ref-raw", PACKAGE_JAVA, true); 652 681 } 653 682 … … 659 688 }; 660 689 661 // ### jarray-set java-array new-value &rest indices662 690 private static final Primitive JARRAY_SET = new pf_jarray_set(); 691 @DocString(name="jarray-set", args="java-array new-value &rest indices", 692 doc="Stores NEW-VALUE at the given index in JAVA-ARRAY.") 663 693 private static final class pf_jarray_set extends Primitive 664 694 { 665 695 pf_jarray_set() 666 696 { 667 super("jarray-set", PACKAGE_JAVA, true, 668 "java-array new-value &rest indices"); 697 super("jarray-set", PACKAGE_JAVA, true); 669 698 } 670 699 … … 699 728 }; 700 729 701 // ### jcall method instance &rest args702 730 /** Calls makeLispObject() to convert the result to an appropriate Lisp type. */ 703 731 private static final Primitive JCALL = new pf_jcall(); 732 @DocString(name="jcall", args="method-ref instance &rest args", 733 doc="Invokes the Java method METHOD-REF on INSTANCE with arguments ARGS," + 734 " coercing the result into a Lisp object, if possible.") 704 735 private static final class pf_jcall extends Primitive 705 736 { 706 737 pf_jcall() 707 738 { 708 super(Symbol.JCALL , "method-ref instance &rest args");739 super(Symbol.JCALL); 709 740 } 710 741 … … 716 747 }; 717 748 718 // ### jcall-raw method instance &rest args719 749 /** 720 750 * Does no type conversion. The result of the call is simply wrapped in a … … 722 752 */ 723 753 private static final Primitive JCALL_RAW = new pf_jcall_raw(); 754 @DocString(name="jcall-raw", args="method-ref instance &rest args", 755 doc="Invokes the Java method METHOD-REF on INSTANCE with arguments ARGS." + 756 " Does not attempt to coerce the result into a Lisp object.") 724 757 private static final class pf_jcall_raw extends Primitive 725 758 { 726 759 pf_jcall_raw() 727 760 { 728 super(Symbol.JCALL_RAW , "method-ref instance &rest args");761 super(Symbol.JCALL_RAW); 729 762 } 730 763 … … 984 1017 } 985 1018 986 // ### make-immediate-object object &optional type987 1019 private static final Primitive MAKE_IMMEDIATE_OBJECT = new pf_make_immediate_object(); 1020 @DocString(name="make-immediate-object", args="object &optional type", 1021 doc="Attempts to coerce a given Lisp object into a java-object of the\n"+ 1022 "given type. If type is not provided, works as jobject-lisp-value.\n"+ 1023 "Currently, type may be :BOOLEAN, treating the object as a truth value,\n"+ 1024 "or :REF, which returns Java null if NIL is provided.") 988 1025 private static final class pf_make_immediate_object extends Primitive 989 1026 { 990 1027 pf_make_immediate_object() 991 1028 { 992 super("make-immediate-object", PACKAGE_JAVA, true, 993 "object &optional type"); 1029 super("make-immediate-object", PACKAGE_JAVA, true); 994 1030 } 995 1031 … … 1020 1056 }; 1021 1057 1022 // ### java-object-p1023 1058 private static final Primitive JAVA_OBJECT_P = new pf_java_object_p(); 1059 @DocString(name="java-object-p", args="object", 1060 doc="Returns T if OBJECT is a JAVA-OBJECT.") 1024 1061 private static final class pf_java_object_p extends Primitive 1025 1062 { 1026 1063 pf_java_object_p() 1027 1064 { 1028 super("java-object-p", PACKAGE_JAVA, true , "object");1065 super("java-object-p", PACKAGE_JAVA, true); 1029 1066 } 1030 1067 … … 1036 1073 }; 1037 1074 1038 // ### jobject-lisp-value java-object1039 1075 private static final Primitive JOBJECT_LISP_VALUE = new pf_jobject_lisp_value(); 1076 @DocString(name="jobject-lisp-value", args="java-object", 1077 doc="Attempts to coerce JAVA-OBJECT into a Lisp object.") 1040 1078 private static final class pf_jobject_lisp_value extends Primitive 1041 1079 { … … 1052 1090 }; 1053 1091 1054 // ### jcoerce java-object intended-class1055 1092 private static final Primitive JCOERCE = new pf_jcoerce(); 1093 @DocString(name="jcoerce", args="object intended-class", 1094 doc="Attempts to coerce OBJECT into a JavaObject of class INTENDED-CLASS." + 1095 " Raises a TYPE-ERROR if no conversion is possible.") 1056 1096 private static final class pf_jcoerce extends Primitive 1057 1097 { 1058 1098 pf_jcoerce() 1059 1099 { 1060 super("jcoerce", PACKAGE_JAVA, true , "java-object intended-class");1100 super("jcoerce", PACKAGE_JAVA, true); 1061 1101 } 1062 1102 … … 1074 1114 }; 1075 1115 1076 // ### %jget-property-value java-object property-name1077 1116 private static final Primitive JGET_PROPERTY_VALUE = new pf__jget_property_value(); 1117 @DocString(name="%jget-propety-value", args="java-object property-name", 1118 doc="Gets a JavaBeans property on JAVA-OBJECT.\n" + 1119 "SYSTEM-INTERNAL: Use jproperty-value instead.") 1078 1120 private static final class pf__jget_property_value extends Primitive 1079 1121 { … … 1103 1145 }; 1104 1146 1105 // ### %jset-property-value java-object property-name value1106 1147 private static final Primitive JSET_PROPERTY_VALUE = new pf__jset_property_value(); 1148 @DocString(name="%jset-propety-value", args="java-object property-name value", 1149 doc="Sets a JavaBean property on JAVA-OBJECT.\n" + 1150 "SYSTEM-INTERNAL: Use (setf jproperty-value) instead.") 1107 1151 private static final class pf__jset_property_value extends Primitive 1108 1152 { … … 1139 1183 }; 1140 1184 1141 1142 // ### jrun-exception-protected closure1143 1185 private static final Primitive JRUN_EXCEPTION_PROTECTED = new pf_jrun_exception_protection(); 1186 @DocString(name="jrun-exception-protected", args="closure", 1187 doc="Invokes the function CLOSURE and returns the result. "+ 1188 "Signals an error if stack or heap exhaustion occurs.") 1144 1189 private static final class pf_jrun_exception_protection extends Primitive 1145 1190 { 1146 1191 pf_jrun_exception_protection() 1147 1192 { 1148 super("jrun-exception-protected", PACKAGE_JAVA, true, 1149 "closure"); 1193 super("jrun-exception-protected", PACKAGE_JAVA, true); 1150 1194 } 1151 1195 -
trunk/abcl/src/org/armedbear/lisp/Lisp.java
r12749 r12826 90 90 91 91 92 // ### nil92 @DocString(name="nil") 93 93 public static final LispObject NIL = Nil.NIL; 94 94 … … 262 262 } 263 263 264 // ### interactive-eval264 @DocString(name="interactive-eval") 265 265 private static final Primitive INTERACTIVE_EVAL = 266 266 new Primitive("interactive-eval", PACKAGE_SYS, true) -
trunk/abcl/src/org/armedbear/lisp/LispObject.java
r12637 r12826 658 658 return ((Cons)entry).cdr; 659 659 } 660 if(docType == Symbol.FUNCTION && this instanceof Symbol) { 661 Object fn = ((Symbol)this).getSymbolFunction(); 662 if(fn instanceof Function) { 663 DocString ds = fn.getClass().getAnnotation(DocString.class); 664 if(ds != null) { 665 String arglist = ds.args(); 666 String docstring = ds.doc(); 667 if(arglist.length() != 0) 668 ((Function)fn).setLambdaList(new SimpleString(arglist)); 669 if(docstring.length() != 0) { 670 SimpleString doc = new SimpleString(docstring); 671 ((Symbol)this).setDocumentation(Symbol.FUNCTION, doc); 672 return doc; 673 } 674 } 675 } 676 } 660 677 return NIL; 661 678 } -
trunk/abcl/src/org/armedbear/lisp/LispThread.java
r12819 r12826 861 861 } 862 862 863 // ### make-thread863 @DocString(name="make-thread", args="function &optional &key name") 864 864 private static final Primitive MAKE_THREAD = 865 865 new Primitive("make-thread", PACKAGE_THREADS, true, "function &optional &key name") … … 887 887 }; 888 888 889 // ### threadp 889 @DocString(name="threadp", args="object", 890 doc="Boolean predicate testing if OBJECT is a thread.") 890 891 private static final Primitive THREADP = 891 new Primitive("threadp", PACKAGE_THREADS, true, "object", 892 "Boolean predicate as whether OBJECT is a thread.") 892 new Primitive("threadp", PACKAGE_THREADS, true) 893 893 { 894 894 @Override … … 899 899 }; 900 900 901 // ### thread-alive-p 901 @DocString(name="thread-alive-p", args="thread", 902 doc="Returns T if THREAD is alive.") 902 903 private static final Primitive THREAD_ALIVE_P = 903 904 new Primitive("thread-alive-p", PACKAGE_THREADS, true, "thread", … … 918 919 }; 919 920 920 // ### thread-name 921 @DocString(name="thread-name", args="thread", 922 doc="Return the name of THREAD, if it has one.") 921 923 private static final Primitive THREAD_NAME = 922 new Primitive("thread-name", PACKAGE_THREADS, true, "thread", 923 "Return the name of THREAD if it has one.") 924 new Primitive("thread-name", PACKAGE_THREADS, true) 924 925 { 925 926 @Override … … 973 974 } 974 975 975 // ### sleep 976 private static final Primitive SLEEP = new Primitive("sleep", PACKAGE_CL, true, "seconds", 977 "Causes the invoking thread to sleep for SECONDS seconds.\nSECONDS may be a value between 0 1and 1.") 976 @DocString(name="sleep", args="seconds", 977 doc="Causes the invoking thread to sleep for SECONDS seconds.\n"+ 978 "SECONDS may be a value between 0 1and 1.") 979 private static final Primitive SLEEP = new Primitive("sleep", PACKAGE_CL, true) 978 980 { 979 981 @Override … … 991 993 }; 992 994 993 // ### mapcar-threads 995 @DocString(name="mapcar-threads", args= "function", 996 doc="Applies FUNCTION to all existing threads.") 994 997 private static final Primitive MAPCAR_THREADS = 995 new Primitive("mapcar-threads", PACKAGE_THREADS, true, "function", 996 "Applies FUNCTION to all existing threads.") 998 new Primitive("mapcar-threads", PACKAGE_THREADS, true) 997 999 { 998 1000 @Override … … 1012 1014 }; 1013 1015 1014 // ### destroy-thread1016 @DocString(name="destroy-thread", args="thread", doc="Mark THREAD as destroyed") 1015 1017 private static final Primitive DESTROY_THREAD = 1016 new Primitive("destroy-thread", PACKAGE_THREADS, true, "thread", 1017 "Mark THREAD as destroyed.") 1018 new Primitive("destroy-thread", PACKAGE_THREADS, true) 1018 1019 { 1019 1020 @Override … … 1032 1033 }; 1033 1034 1034 // ### interrupt-thread thread function &rest args => T 1035 // Interrupts thread and forces it to apply function to args. When the 1036 // function returns, the thread's original computation continues. If 1037 // multiple interrupts are queued for a thread, they are all run, but the 1038 // order is not guaranteed. 1035 // => T 1036 @DocString(name="interrupt-thread", args="thread function &rest args", 1037 doc="Interrupts thread and forces it to apply function to args. When the\n"+ 1038 "function returns, the thread's original computation continues. If\n"+ 1039 "multiple interrupts are queued for a thread, they are all run, but the\n"+ 1040 "order is not guaranteed.") 1039 1041 private static final Primitive INTERRUPT_THREAD = 1040 1042 new Primitive("interrupt-thread", PACKAGE_THREADS, true, … … 1063 1065 }; 1064 1066 1065 // ### current-thread 1067 @DocString(name="current-thread", 1068 doc="Returns a reference to invoking thread.") 1066 1069 private static final Primitive CURRENT_THREAD = 1067 new Primitive("current-thread", PACKAGE_THREADS, true, "", 1068 "Returns a reference to invoking thread.") 1070 new Primitive("current-thread", PACKAGE_THREADS, true) 1069 1071 { 1070 1072 @Override … … 1075 1077 }; 1076 1078 1077 // ### backtrace 1079 @DocString(name="backtrace", 1080 doc="Returns a backtrace of the invoking thread.") 1078 1081 private static final Primitive BACKTRACE = 1079 new Primitive("backtrace", PACKAGE_SYS, true, "", 1080 "Returns a backtrace of the invoking thread.") 1082 new Primitive("backtrace", PACKAGE_SYS, true) 1081 1083 { 1082 1084 @Override … … 1090 1092 } 1091 1093 }; 1092 // ### frame-to-string1094 @DocString(name="frame-to-string", args="frame") 1093 1095 private static final Primitive FRAME_TO_STRING = 1094 new Primitive("frame-to-string", PACKAGE_SYS, true , "frame")1096 new Primitive("frame-to-string", PACKAGE_SYS, true) 1095 1097 { 1096 1098 @Override … … 1105 1107 }; 1106 1108 1107 // ### frame-to-list1109 @DocString(name="frame-to-list", args="frame") 1108 1110 private static final Primitive FRAME_TO_LIST = 1109 new Primitive("frame-to-list", PACKAGE_SYS, true , "frame")1111 new Primitive("frame-to-list", PACKAGE_SYS, true) 1110 1112 { 1111 1113 @Override … … 1121 1123 1122 1124 1123 // ### use-fast-calls1125 @DocString(name="use-fast-calls") 1124 1126 private static final Primitive USE_FAST_CALLS = 1125 1127 new Primitive("use-fast-calls", PACKAGE_SYS, true) … … 1133 1135 }; 1134 1136 1135 // ### synchronized-on1137 @DocString(name="synchronized-on", args="form &body body") 1136 1138 private static final SpecialOperator SYNCHRONIZED_ON = 1137 1139 new SpecialOperator("synchronized-on", PACKAGE_THREADS, true, … … 1152 1154 }; 1153 1155 1154 // ### object-wait1156 @DocString(name="object-wait", args="object &optional timeout") 1155 1157 private static final Primitive OBJECT_WAIT = 1156 new Primitive("object-wait", PACKAGE_THREADS, true, 1157 "object &optional timeout") 1158 new Primitive("object-wait", PACKAGE_THREADS, true) 1158 1159 { 1159 1160 @Override … … 1190 1191 }; 1191 1192 1192 // ### object-notify1193 @DocString(name="object-notify", args="object") 1193 1194 private static final Primitive OBJECT_NOTIFY = 1194 1195 new Primitive("object-notify", PACKAGE_THREADS, true, … … 1209 1210 }; 1210 1211 1211 // ### object-notify-all1212 @DocString(name="object-notify-all", args="object") 1212 1213 private static final Primitive OBJECT_NOTIFY_ALL = 1213 new Primitive("object-notify-all", PACKAGE_THREADS, true, 1214 "object") 1214 new Primitive("object-notify-all", PACKAGE_THREADS, true) 1215 1215 { 1216 1216 @Override -
trunk/abcl/src/org/armedbear/lisp/Operator.java
r12288 r12826 54 54 public final LispObject getLambdaList() 55 55 { 56 if(lambdaList == null) { 57 DocString ds = getClass().getAnnotation(DocString.class); 58 if(ds != null) 59 lambdaList = new SimpleString(ds.args()); 60 } 56 61 return lambdaList; 57 62 } -
trunk/abcl/src/org/armedbear/lisp/Primitive.java
r12254 r12826 46 46 } 47 47 48 public Primitive(Symbol symbol) 49 { 50 super(symbol); 51 } 52 48 53 public Primitive(Symbol symbol, String arglist) 49 54 { -
trunk/abcl/src/org/armedbear/lisp/logorc2.java
r12288 r12826 38 38 import java.math.BigInteger; 39 39 40 // ### logorc241 40 // logorc2 integer-1 integer-2 => result-integer 42 41 // or integer-1 with complement of integer-2 42 @DocString(name="logorc2", args="integer-1 integer-2") 43 43 public final class logorc2 extends Primitive 44 44 { -
trunk/abcl/src/org/armedbear/lisp/package_error_package.java
r12288 r12826 36 36 import static org.armedbear.lisp.Lisp.*; 37 37 38 // ### package-error-package 38 @DocString(name="package-error-package") 39 39 public final class package_error_package extends Primitive 40 40 {
Note: See TracChangeset
for help on using the changeset viewer.