source: trunk/abcl/src/org/armedbear/lisp/mop.lisp @ 13789

Last change on this file since 13789 was 13789, checked in by rschlatte, 11 years ago

Implement ensure-class-using-class.

File size: 2.3 KB
Line 
1;;;; Does not currently include all the MOP, but it should.
2
3(in-package #:mop)
4
5;;; StandardGenericFunction.java defines FUNCALLABLE-INSTANCE-FUNCTION and
6;;; SET-FUNCALLABLE-INSTANCE-FUNCTION.
7;;;
8;;; TODO
9;;;
10;;;   1. Verify that we can make FUNCALLABLE-STANDARD-CLASS instances
11;;;      which work.
12;;;
13;;;   2. Tighten the type checks so that only instances of
14;;;      FUNCALLABLE-STANDARD-CLASS are callable.
15
16(defgeneric validate-superclass (class superclass)
17 (:documentation 
18  "This generic function is called to determine whether the class
19  superclass is suitable for use as a superclass of class."))
20
21;;; TODO Hook VALIDATE-SUPERCLASS into during class metaobject
22;;; initialization and reinitialization. (AMOP p.240-1)
23(defmethod validate-superclass ((class class) (superclass class))
24  (or (eql (class-name superclass) t)
25      (eql (class-name class) (class-name superclass))
26      (or (and (eql (class-name class) 'standard-class)
27               (eql (class-name superclass) 'funcallable-standard-class))
28          (and (eql (class-name class) 'funcallable-standard-class)
29               (eql (class-name superclass) 'standard-class)))))
30
31(export '(funcallable-standard-object
32          funcallable-standard-class
33          forward-referenced-class
34          validate-superclass
35          direct-slot-definition-class
36          effective-slot-definition-class
37          compute-effective-slot-definition
38          compute-class-precedence-list
39          compute-effective-slot-definition
40          compute-slots
41          finalize-inheritance
42          slot-boundp-using-class
43          slot-makunbound-using-class
44
45          ensure-class
46          ensure-class-using-class
47
48          class-default-initargs
49          class-direct-default-initargs
50          class-direct-slots
51          class-direct-subclasses
52          class-direct-superclasses
53          class-finalized-p
54          class-prototype
55         
56          generic-function-lambda-list
57
58          standard-method
59          method-function
60          standard-accessor-method
61          standard-reader-method
62          standard-writer-method
63
64          slot-definition
65          slot-definition-readers
66          slot-definition-writers
67
68          eql-specializer-object
69          extract-lambda-list
70          extract-specializer-names
71
72          intern-eql-specializer))
73
74(provide 'mop)
75
76
77
78
79
Note: See TracBrowser for help on using the repository browser.