Changeset 4311
- Timestamp:
- 10/11/03 18:48:09 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/lisp/LispClass.java
r4288 r4311 3 3 * 4 4 * Copyright (C) 2003 Peter Graves 5 * $Id: LispClass.java,v 1.3 1 2003-10-10 17:03:17piso Exp $5 * $Id: LispClass.java,v 1.32 2003-10-11 18:48:09 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 46 46 private LispObject directSubclasses; 47 47 private LispObject classPrecedenceList = NIL; 48 private LispObject directMethods = NIL; 48 49 49 50 protected LispClass() … … 333 334 }; 334 335 336 // ### class-direct-methods 337 private static final Primitive1 CLASS_DIRECT_METHODS = 338 new Primitive1("class-direct-methods", PACKAGE_SYS, false) 339 { 340 public LispObject execute(LispObject arg) 341 throws ConditionThrowable 342 { 343 if (arg instanceof LispClass) 344 return ((LispClass)arg).directMethods; 345 throw new ConditionThrowable(new TypeError(arg, "class")); 346 } 347 }; 348 349 // ### %set-class-direct-methods 350 private static final Primitive2 _SET_CLASS_DIRECT_METHODS = 351 new Primitive2("%set-class-direct-methods", PACKAGE_SYS, false) 352 { 353 public LispObject execute(LispObject first, LispObject second) 354 throws ConditionThrowable 355 { 356 if (first instanceof LispClass) { 357 ((LispClass)first).directMethods = second; 358 return second; 359 } 360 throw new ConditionThrowable(new TypeError(first, "class")); 361 } 362 }; 363 335 364 // ### classp 336 365 private static final Primitive1 CLASSP =
Note: See TracChangeset
for help on using the changeset viewer.