Changeset 5806


Ignore:
Timestamp:
02/13/04 16:25:19 (17 years ago)
Author:
piso
Message:

CLASS-DOCUMENTATION
%SET-CLASS-DOCUMENTATION

File:
1 edited

Legend:

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

    r5580 r5806  
    33 *
    44 * Copyright (C) 2003-2004 Peter Graves
    5  * $Id: LispClass.java,v 1.40 2004-01-27 14:46:29 piso Exp $
     5 * $Id: LispClass.java,v 1.41 2004-02-13 16:25:19 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4848    private LispObject classPrecedenceList = NIL;
    4949    private LispObject directMethods = NIL;
     50    private LispObject documentation = NIL;
    5051
    5152    protected LispClass()
     
    433434    };
    434435
     436    // ### class-documentation
     437    private static final Primitive1 CLASS_DOCUMENTATION =
     438        new Primitive1("class-documentation", PACKAGE_SYS, false)
     439    {
     440        public LispObject execute(LispObject arg)
     441            throws ConditionThrowable
     442        {
     443            if (arg instanceof LispClass)
     444                return ((LispClass)arg).directMethods;
     445            return signal(new TypeError(arg, "class"));
     446        }
     447    };
     448
     449    // ### %set-class-documentation
     450    private static final Primitive2 _SET_CLASS_DOCUMENTATION =
     451        new Primitive2("%set-class-documentation", PACKAGE_SYS, false)
     452    {
     453        public LispObject execute(LispObject first, LispObject second)
     454            throws ConditionThrowable
     455        {
     456            if (first instanceof LispClass) {
     457                ((LispClass)first).directMethods = second;
     458                return second;
     459            }
     460            return signal(new TypeError(first, "class"));
     461        }
     462    };
     463
    435464    // ### classp
    436465    private static final Primitive1 CLASSP =
Note: See TracChangeset for help on using the changeset viewer.