1 | ;;;; Does not currently include all the MOP, but it should. |
---|
2 | |
---|
3 | (in-package #:mop) |
---|
4 | |
---|
5 | (defclass funcallable-standard-class (class)) |
---|
6 | |
---|
7 | (defmethod class-name ((class funcallable-standard-class)) |
---|
8 | 'funcallable-standard-class) |
---|
9 | |
---|
10 | ;;; StandardGenericFunction.java defines FUNCALLABLE-INSTANCE-FUNCTION and |
---|
11 | ;;; SET-FUNCALLABLE-INSTANCE-FUNCTION. |
---|
12 | ;;; |
---|
13 | ;;; TODO |
---|
14 | ;;; |
---|
15 | ;;; 1. Verify that we can make FUNCALLABLE-STANDARD-CLASS instances |
---|
16 | ;;; which work. |
---|
17 | ;;; |
---|
18 | ;;; 2. Tighten the type checks so that only instances of |
---|
19 | ;;; FUNCALLABLE-STANDARD-CLASS are callable. |
---|
20 | |
---|
21 | (defgeneric validate-superclass (class superclass) |
---|
22 | (:documentation |
---|
23 | "This generic function is called to determine whether the class |
---|
24 | superclass is suitable for use as a superclass of class.")) |
---|
25 | |
---|
26 | ;;; TODO Hook VALIDATE-SUPERCLASS into during class metaobject |
---|
27 | ;;; initialization and reinitialization. (AMOP p.240-1) |
---|
28 | (defmethod validate-superclass ((class class) (superclass class)) |
---|
29 | (or (eql (class-name superclass) t) |
---|
30 | (eql (class-name class) (class-name superclass)) |
---|
31 | (or (and (eql (class-name class) 'standard-class) |
---|
32 | (eql (class-name superclass) 'funcallable-standard-class)) |
---|
33 | (and (eql (class-name class) 'funcallable-standard-class) |
---|
34 | (eql (class-name superclass) 'standard-class))))) |
---|
35 | |
---|
36 | (export '(funcallable-standard-class |
---|
37 | validate-superclass |
---|
38 | direct-slot-definition-class |
---|
39 | effective-slot-definition-class |
---|
40 | compute-effective-slot-definition |
---|
41 | compute-class-precedence-list |
---|
42 | compute-effective-slot-definition |
---|
43 | compute-slots |
---|
44 | finalize-inheritance |
---|
45 | slot-boundp-using-class |
---|
46 | slot-makunbound-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 | method-function |
---|
59 | |
---|
60 | slot-definition-readers |
---|
61 | slot-definition-writers |
---|
62 | |
---|
63 | eql-specializer-object |
---|
64 | extract-lambda-list |
---|
65 | |
---|
66 | intern-eql-specializer)) |
---|
67 | |
---|
68 | (provide 'mop) |
---|
69 | |
---|
70 | |
---|
71 | |
---|
72 | |
---|
73 | |
---|