Changeset 5217


Ignore:
Timestamp:
12/20/03 09:04:39 (17 years ago)
Author:
asimon
Message:

Added arglists.
Use 4-arg constructor instead of separate exports.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Java.java

    r5111 r5217  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Java.java,v 1.28 2003-12-12 19:41:20 piso Exp $
     5 * $Id: Java.java,v 1.29 2003-12-20 09:04:39 asimon Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3131{
    3232    // ### jclass
    33     private static final Primitive1 JCLASS = new Primitive1("jclass", PACKAGE_JAVA)
     33    private static final Primitive1 JCLASS = new Primitive1("jclass", PACKAGE_JAVA, true, "name")
    3434    {
    3535        public LispObject execute(LispObject arg) throws ConditionThrowable
     
    7777     *               derived from the instance.
    7878     */
    79     private static final Primitive JFIELD = new Primitive("jfield", PACKAGE_JAVA)
     79    private static final Primitive JFIELD =
     80      new Primitive("jfield", PACKAGE_JAVA, true,
     81                    "class-ref-or-field field-or-instance &optional instance value")
    8082    {
    8183        public LispObject execute(LispObject[] args) throws ConditionThrowable
     
    9193                    // Cases 1-5.
    9294                    fieldName = LispString.getValue(args[1]);
    93         c = forClassRef(args[0]);
     95                    c = forClassRef(args[0]);
    9496                } else {
    9597                    // Cases 6 and 7.
     
    159161    // jconstructor class-ref &rest parameter-class-refs
    160162    private static final Primitive JCONSTRUCTOR =
    161         new Primitive("jconstructor", PACKAGE_JAVA)
     163        new Primitive("jconstructor", PACKAGE_JAVA, true, "class-ref &rest parameter-class-refs")
    162164    {
    163165        public LispObject execute(LispObject[] args) throws ConditionThrowable
     
    205207    // ### jmethod
    206208    // jmethod class-ref name &rest parameter-class-refs
    207     private static final Primitive JMETHOD = new Primitive("jmethod", PACKAGE_JAVA)
     209    private static final Primitive JMETHOD = new Primitive("jmethod", PACKAGE_JAVA, true,
     210                                                           "class-ref name &rest parameter-class-refs")
    208211    {
    209212        public LispObject execute(LispObject[] args) throws ConditionThrowable
     
    254257    // ### jstatic
    255258    // jstatic method class &rest args
    256     private static final Primitive JSTATIC = new Primitive("jstatic", PACKAGE_JAVA)
     259    private static final Primitive JSTATIC = new Primitive("jstatic", PACKAGE_JAVA, true,
     260                                                           "method class &rest args")
    257261    {
    258262        public LispObject execute(LispObject[] args) throws ConditionThrowable
     
    303307    // ### jnew
    304308    // jnew constructor &rest args
    305     private static final Primitive JNEW = new Primitive("jnew", PACKAGE_JAVA)
     309    private static final Primitive JNEW = new Primitive("jnew", PACKAGE_JAVA, true,
     310                                                        "constructor &rest args")
    306311    {
    307312        public LispObject execute(LispObject[] args) throws ConditionThrowable
     
    328333    // ### jcall
    329334    // jcall method instance &rest args
    330     private static final Primitive JCALL = new Primitive("jcall", PACKAGE_JAVA)
     335    private static final Primitive JCALL = new Primitive("jcall", PACKAGE_JAVA, true,
     336                                                         "method instance &rest args")
    331337    {
    332338        public LispObject execute(LispObject[] args) throws ConditionThrowable
     
    358364    // ### make-immediate-object
    359365    // make-immediate-object object &optional type
    360     private static final Primitive MAKE_IMMEDIATE_OBJECT = new Primitive("make-immediate-object", PACKAGE_JAVA, true)
     366    private static final Primitive MAKE_IMMEDIATE_OBJECT =
     367      new Primitive("make-immediate-object", PACKAGE_JAVA, true, "object &optional type")
    361368    {
    362369        public LispObject execute(LispObject[] args) throws ConditionThrowable
     
    386393    };
    387394
    388     private static final Primitive1 JAVA_OBJECT_P = new Primitive1("java-object-p", PACKAGE_JAVA)
     395    private static final Primitive1 JAVA_OBJECT_P = new Primitive1("java-object-p", PACKAGE_JAVA, true,
     396                                                                   "object")
    389397    {
    390398        public LispObject execute(LispObject arg) throws ConditionThrowable
     
    485493        return message;
    486494    }
    487 
    488     static {
    489         export("JCLASS", PACKAGE_JAVA);
    490         export("JFIELD", PACKAGE_JAVA);
    491         export("JCONSTRUCTOR", PACKAGE_JAVA);
    492         export("JMETHOD", PACKAGE_JAVA);
    493         export("JSTATIC", PACKAGE_JAVA);
    494         export("JNEW", PACKAGE_JAVA);
    495         export("JCALL", PACKAGE_JAVA);
    496         export("JAVA-OBJECT-P", PACKAGE_JAVA);
    497     }
    498495}
Note: See TracChangeset for help on using the changeset viewer.