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

Last change on this file since 13837 was 13837, checked in by rschlatte, 10 years ago

Implement specializer-method--related protocol.

Add add-direct-method, remove-direct-method, specializer-direct-methods,
specializer-direct-generic-functions

File size: 2.7 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 '(;; classes
32          funcallable-standard-object
33          funcallable-standard-class
34          forward-referenced-class
35          direct-slot-definition-class
36          effective-slot-definition-class
37          standard-method
38          standard-accessor-method
39          standard-reader-method
40          standard-writer-method
41         
42          compute-effective-slot-definition
43          compute-class-precedence-list
44          compute-effective-slot-definition
45          compute-slots
46          finalize-inheritance
47          slot-boundp-using-class
48          slot-makunbound-using-class
49          validate-superclass
50
51          ensure-class
52          ensure-class-using-class
53
54          class-default-initargs
55          class-direct-default-initargs
56          class-direct-slots
57          class-direct-subclasses
58          class-direct-superclasses
59          class-finalized-p
60          class-prototype
61         
62          generic-function-lambda-list
63
64          method-function
65          method-specializers
66          method-generic-function
67          standard-reader-method
68          standard-writer-method
69          reader-method-class
70          writer-method-class
71
72          slot-definition
73          slot-definition-readers
74          slot-definition-writers
75
76          intern-eql-specializer
77          eql-specializer-object
78          specializer-direct-methods
79          specializer-direct-generic-functions
80          add-direct-method
81          remove-direct-method
82
83          extract-lambda-list
84          extract-specializer-names
85          ))
86
87(provide 'mop)
88
89
90
91
92
Note: See TracBrowser for help on using the repository browser.