507 lines
No EOL
110 KiB
HTML
507 lines
No EOL
110 KiB
HTML
<!doctype html>
|
||
<html lang="en" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-meta-object-protocol/chap-6/6-1-sections" data-has-hydrated="false">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="generator" content="Docusaurus v3.0.1">
|
||
<title data-rh="true">6.1 Sections | Common Lisp (New) Language Reference</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://lisp-docs.github.io/cl-language-reference/img/1024px-Lisp_logo.svg.png"><meta data-rh="true" name="twitter:image" content="https://lisp-docs.github.io/cl-language-reference/img/1024px-Lisp_logo.svg.png"><meta data-rh="true" property="og:url" content="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/chap-6/6-1-sections"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="google-site-verification" content="Vzaw013_bfdKeUVG89Ch3W1zC9_vH9ID2dPB9Dz0vr0"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="6.1 Sections | Common Lisp (New) Language Reference"><meta data-rh="true" name="description" content="6.1.2 Initialization of class metaobjects"><meta data-rh="true" property="og:description" content="6.1.2 Initialization of class metaobjects"><link data-rh="true" rel="icon" href="../../img/favicon.ico"><link data-rh="true" rel="canonical" href="6-1-sections.html"><link data-rh="true" rel="alternate" href="6-1-sections.html" hreflang="en"><link data-rh="true" rel="alternate" href="6-1-sections.html" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://C1F2Q5VM6X-dsn.algolia.net" crossorigin="anonymous"><link rel="preconnect" href="https://www.google-analytics.com">
|
||
<link rel="preconnect" href="https://www.googletagmanager.com">
|
||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-8TJCE4NSF8"></script>
|
||
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-8TJCE4NSF8",{})</script>
|
||
|
||
|
||
<link rel="search" type="application/opensearchdescription+xml" title="Common Lisp (New) Language Reference" href="../../opensearch.xml"><link rel="stylesheet" href="../../assets/css/styles.f13b59fe.css">
|
||
<script src="../../assets/js/runtime~main.02699c25.js" defer="defer"></script>
|
||
<script src="../../assets/js/main.4f0a7a76.js" defer="defer"></script>
|
||
</head>
|
||
<body class="navigation-with-keyboard">
|
||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return localStorage.getItem("theme")}catch(t){}}();t(null!==e?e:"light")}(),function(){try{const c=new URLSearchParams(window.location.search).entries();for(var[t,e]of c)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="6-1-sections.html#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="../../../index.html" target="_blank" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="../../img/logo.svg" alt="Lisp Logo" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="../../img/logo.svg" alt="Lisp Logo" class="themedComponent_mlkZ themedComponent--dark_xIcU"></div><b class="navbar__title text--truncate">Common Lisp Docs</b></a><a href="../../../docs/tutorial/index.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Tutorial</a><a href="../../index.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Technical Reference</a><a href="../../../docs/whylisp.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Why Lisp?</a><a href="../../../docs/howto.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Guides</a></div><div class="navbar__items navbar__items--right"><a href="../../../docs/contribute.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Contribute!</a><a href="../../../docs/help.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Getting Help</a><a href="../../../docs/about.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">About</a><a href="../../../blog.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Blog</a><a href="https://github.com/lisp-docs" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)" aria-live="polite"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="navbarSearchContainer_Bca1"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0"><div class="docsWrapper_hBAB"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docRoot_UBD9"><aside class="theme-doc-sidebar-container docSidebarContainer_YfHR"><div class="sidebarViewport_aRkj"><div class="sidebar_njMd"><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="../../index.html">Introduction</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-0/intro.html">Contents and Figures</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-1/b-b-scope-purpose-and-history.html">1. Introduction</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-2/c-b-character-syntax.html">2. Syntax</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-3/d-b-evaluation.html">3. Evaluation and Compilation</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-4/e-b-introduction.html">4. Types and Classes</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-5/f-b-generalized-reference.html">5. Data and Control Flow</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-6/g-b-the-loop-facility.html">6. Iteration</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-7/h-b-object-creation-and-initialization.html">7. Objects</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../category/81-structures-dictionary.html">8. Structures</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-9/j-b-condition-system-concepts.html">9. Conditions</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-10/ba-b-symbol-concepts.html">10. Symbols</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-11/bb-b-package-concepts.html">11. Packages</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-12/bc-b-number-concepts.html">12. Numbers</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-13/bd-b-character-concepts.html">13. Characters</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-14/be-b-cons-concepts.html">14. Conses</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-15/bf-b-array-concepts.html">15. Arrays</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-16/bg-b-string-concepts.html">16. Strings</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-17/bh-b-sequence-concepts.html">17. Sequences</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-18/bi-b-hash-table-concepts.html">18. Hash Tables</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-19/bj-b-overview-of-filenames.html">19. Filenames</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-20/ca-b-file-system-concepts.html">20. Files</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-21/cb-b-stream-concepts.html">21. Streams</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-22/cc-b-the-lisp-printer.html">22. Printer</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-23/cd-b-reader-concepts.html">23. Reader</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-24/ce-b-system-construction-concepts.html">24. System Construction</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-25/cf-b-the-external-environment.html">25. External Environment</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../environments.html">26. Environments</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" href="../../meta-object-protocol.html">27. Meta Object Protocol</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="../../meta-object-protocol.html">Meta Object Protocol Introduction</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="false" tabindex="0" href="../../category/chapter-5---concepts.html">Chapter 5 - Concepts</a><button aria-label="Expand sidebar category 'Chapter 5 - Concepts'" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--active" aria-expanded="true" tabindex="0" href="../../category/chapter-6---generic-functions-and-methods.html">Chapter 6 - Generic Functions and Methods</a><button aria-label="Collapse sidebar category 'Chapter 6 - Generic Functions and Methods'" type="button" class="clean-btn menu__caret"></button></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="6-1-sections.html">6.1 Sections</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="all.html">Index of all functions and methods</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="false" tabindex="0" href="../../category/additional-material.html">Additional Material</a><button aria-label="Expand sidebar category 'Additional Material'" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="false" tabindex="0" href="../../category/mop-dictionary.html">MOP Dictionary</a><button aria-label="Expand sidebar category 'MOP Dictionary'" type="button" class="clean-btn menu__caret"></button></div></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../data-structures.html">28. Data Structures</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../portability/trivial-packages.html">29. Portability</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="../../dictionary-entries.html">dictionary-entries</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../../chap-26/intro.html">Glossary</a></div></li></ul></nav></div></div></aside><main class="docMainContainer_TBSr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="../../index.html"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">27. Meta Object Protocol</span><meta itemprop="position" content="1"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item"><a class="breadcrumbs__link" itemprop="item" href="../../category/chapter-6---generic-functions-and-methods.html"><span itemprop="name">Chapter 6 - Generic Functions and Methods</span></a><meta itemprop="position" content="2"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">6.1 Sections</span><meta itemprop="position" content="3"></li></ul></nav><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><h1>6.1 Sections</h1>
|
||
<!-- -->
|
||
<h1>Chapter 6 Sections</h1>
|
||
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="chapter-6-sections-1">Chapter 6 Sections<a href="6-1-sections.html#chapter-6-sections-1" class="hash-link" aria-label="Direct link to Chapter 6 Sections" title="Direct link to Chapter 6 Sections"></a></h3>
|
||
<ul>
|
||
<li><a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/initialization-of-class-metaobjects2">Initialization of class metaobjects</a></li>
|
||
<li><a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/initialization-of-generic-function-metaobjects">Initialization of generic function metaobjects</a></li>
|
||
<li><a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/initialization-of-method-metaobjects">Initialization of method metaobjects</a></li>
|
||
<li><a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/initialization-of-slot-definition-metaobjects">Initialization of slot definition metaobjects</a></li>
|
||
<li><a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/readers-for-class-metaobjects">Readers for class metaobjects</a></li>
|
||
<li><a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/readers-for-generic-function-metaobjects">Readers for generic function metaobjects</a></li>
|
||
<li><a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/readers-for-method-metaobjects">Readers for method metaobjects</a></li>
|
||
<li><a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/readers-for-slot-definition-metaobjects">Readers for slot definition metaobjects</a></li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="612-initialization-of-class-metaobjects">6.1.2 Initialization of class metaobjects<a href="6-1-sections.html#612-initialization-of-class-metaobjects" class="hash-link" aria-label="Direct link to 6.1.2 Initialization of class metaobjects" title="Direct link to 6.1.2 Initialization of class metaobjects"></a></h2>
|
||
<!-- -->
|
||
<h1>Initialization of Class Metaobjects</h1>
|
||
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="initialization-of-class-metaobjects-1">Initialization of Class Metaobjects<a href="6-1-sections.html#initialization-of-class-metaobjects-1" class="hash-link" aria-label="Direct link to Initialization of Class Metaobjects" title="Direct link to Initialization of Class Metaobjects"></a></h3>
|
||
<p>A class metaobject can be created by calling <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/make-instance">make-instance</a>. The initialization arguments establish the definition of the class. A class metaobject can be redefined by calling <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reinit.htm#reinitialize-instance" target="_blank" rel="noopener noreferrer">reinitialize-instance</a>. Some classes of class metaobject do not support redefinition; in these cases, <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reinit.htm#reinitialize-instance" target="_blank" rel="noopener noreferrer">reinitialize-instance</a> signals an error.</p>
|
||
<p>Initialization of a class metaobject must be done by calling <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/make-instance">make-instance</a> and allowing it to call <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_init_i.htm#initialize-instance" target="_blank" rel="noopener noreferrer">initialize-instance</a>. Reinitialization of a class metaobject must be done by calling <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reinit.htm#reinitialize-instance" target="_blank" rel="noopener noreferrer">reinitialize-instance</a>. Portable programs must not call <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_init_i.htm#initialize-instance" target="_blank" rel="noopener noreferrer">initialize-instance</a> directly to initialize a class metaobject. Portable programs must not call <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_shared.htm#shared-initialize" target="_blank" rel="noopener noreferrer">shared-initialize</a> directly to initialize or reinitialize a class metaobject. Portable programs must not call <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_chg_cl.htm#change-class" target="_blank" rel="noopener noreferrer">change-class</a> to change the class of any class metaobject or to turn a non-class object into a class metaobject.</p>
|
||
<p>Since metaobject classes may not be redefined, no behavior is specified for the result of calls to <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_upda_1.htm#update-instance-for-redefined-class" target="_blank" rel="noopener noreferrer">update-instance-for-redefined-class</a> on class metaobjects. Since the class of class metaobjects may not be changed, no behavior is specified for the result of calls to <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_update.htm#update-instance-for-different-class" target="_blank" rel="noopener noreferrer">update-instance-for-different-class</a> on class metaobjects.</p>
|
||
<p>During initialization or reinitialization, each initialization argument is checked for errors and then associated with the class metaobject. The value can then be accessed by calling the appropriate accessor as shown in the table below. (FIXME<!-- -->:insert<!-- --> anchor)</p>
|
||
<p>This section begins with a description of the error checking and processing of each initialization argument. This is followed by a table showing the generic functions that can be used to access the stored initialization arguments. Initialization behavior specific to the different specified class metaobject classes comes next. The section ends with a set of restrictions on portable methods affecting class metaobject initialization and reinitialization.</p>
|
||
<p>In these descriptions, the phrase ``this argument defaults to <em>value</em>'' means that when that initialization argument is not supplied, initialization or reinitialization is performed as if <em>value</em> had been supplied. For some initialization arguments this could be done by the use of default initialization arguments, but whether it is done this way is not specified. Implementations are free to define default initialization arguments for specified class metaobject classes. Portable programs are free to define default initialization arguments for portable subclasses of the class <a href="http://www.lispworks.com/documentation/HyperSpec/Body/t_class.htm#class" target="_blank" rel="noopener noreferrer">class</a>.</p>
|
||
<p>Unless there is a specific note to the contrary, then during reinitialization, if an initialization argument is not supplied, the previously stored value is left unchanged.</p>
|
||
<ul>
|
||
<li>
|
||
<p>The <code>:direct-default-initargs</code> argument is a list of canonicalized default initialization arguments.</p>
|
||
<p>An error is signaled if this value is not a proper list, or if any element of the list is not a canonicalized default initialization argument.</p>
|
||
<p>If the class metaobject is being initialized, this argument defaults to the empty list.</p>
|
||
</li>
|
||
<li>
|
||
<p>The <code>:direct-slots</code> argument is a list of canonicalized slot specifications.</p>
|
||
<p>An error is signaled if this value is not a proper list or if any element of the list is not a canonicalized slot specification.</p>
|
||
<p>After error checking, this value is converted to a list of direct slot definition metaobjects before it is associated with the class metaobject. Conversion of each canonicalized slot specification to a direct slot definition metaobject is a two-step process. First, the generic function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/direct-slot-definition-class">direct-slot-definition-class</a> is called with the class metaobject and the canonicalized slot specification to determine the class of the new direct slot definition metaobject; this permits both the class metaobject and the canonicalized slot specification to control the resulting direct slot definition metaobject class. Second, <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/make-instance">make-instance</a> is applied to the direct slot definition metaobject class and the canonicalized slot specification. This conversion could be implemented as shown in the following code:</p>
|
||
<p>(defun convert-to-direct-slot-definition (class canonicalized-slot)
|
||
(apply #'make-instance
|
||
(apply #'direct-slot-definition-class
|
||
class canonicalized-slot)
|
||
canonicalized-slot))</p>
|
||
<p>If the class metaobject is being initialized, this argument defaults to the empty list.</p>
|
||
<p>Once the direct slot definition metaobjects have been created, the specified reader and writer methods are created. The generic functions <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/reader-method-class">reader-method-class</a> and <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/writer-method-class">writer-method-class</a> are called to determine the classes of the method metaobjects created.</p>
|
||
</li>
|
||
<li>
|
||
<p>The <code>:direct-superclasses</code> argument is a list of class metaobjects. Classes which do not support multiple inheritance signal an error if the list contains more than one element.</p>
|
||
<p>An error is signaled if this value is not a proper list or if <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/validate-superclass">validate-superclass</a> applied to <em>class</em> and any element of this list returns false.</p>
|
||
<p>When the class metaobject is being initialized, and this argument is either not supplied or is the empty list, this argument defaults as follows: if the class is an instance of <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-standard-class">standard-class</a> or one of its subclasses the default value is a list of the class <a href="http://www.lispworks.com/documentation/HyperSpec/Body/t_std_ob.htm#standard-object" target="_blank" rel="noopener noreferrer">standard-object</a>; if the class is an instance of <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-funcallable-standard-class">funcallable-standard-class</a> or one of its subclasses the default value is list of the class <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-funcallable-standard-object">funcallable-standard-object</a>.</p>
|
||
<p>After any defaulting of the value, the generic function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/add-direct-subclass">add-direct-subclass</a> is called once for each element of the list.</p>
|
||
<p>When the class metaobject is being reinitialized and this argument is supplied, the generic function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/remove-direct-subclass">remove-direct-subclass</a> is called once for each class metaobject in the previously stored value but not in the new value; the generic function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/add-direct-subclass">add-direct-subclass</a> is called once for each class metaobject in the new value but not in the previously stored value.</p>
|
||
</li>
|
||
<li>
|
||
<p>The <code>:documentation</code> argument is a string or <code>nil</code>.</p>
|
||
<p>An error is signaled if this value is not a string or <code>nil</code>.</p>
|
||
<p>If the class metaobject is being initialized, this argument defaults to <code>nil</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p>The <code>:name</code> argument is an object.</p>
|
||
<p>If the class is being initialized, this argument defaults to <code>nil</code>.</p>
|
||
</li>
|
||
</ul>
|
||
<p>After the processing and defaulting of initialization arguments described above, the value of each initialization argument is associated with the class metaobject. These values can then be accessed by calling the corresponding generic function. The correspondences are as follows:</p>
|
||
<p>Initialization Argument Generic Function</p>
|
||
<hr>
|
||
<p><strong>:direct-default-initargs</strong> <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-direct-default-initargs">class-direct-default-initargs</a>
|
||
<strong>:direct-slots</strong> <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-direct-slots">class-direct-slots</a>
|
||
<strong>:direct-superclasses</strong> <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-direct-superclasses">class-direct-superclasses</a>
|
||
<strong>:documentation</strong> <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_docume.htm#documentation" target="_blank" rel="noopener noreferrer">documentation</a>
|
||
<strong>:name</strong> <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-name">class-name</a></p>
|
||
<p>Initialization arguments and accessors for class metaobjects.</p>
|
||
<p>Instances of the class <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-standard-class">standard-class</a> support multiple inheritance and reinitialization. Instances of the class <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-funcallable-standard-class">funcallable-standard-class</a> support multiple inheritance and reinitialization. For forward referenced classes, all of the initialization arguments default to <code>nil</code>.</p>
|
||
<p>Since built-in classes cannot be created or reinitialized by the user, an error is signaled if <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_init_i.htm#initialize-instance" target="_blank" rel="noopener noreferrer">initialize-instance</a> or <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reinit.htm#reinitialize-instance" target="_blank" rel="noopener noreferrer">reinitialize-instance</a> are called to initialize or reinitialize a derived instance of the class <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-built-in-class">built-in-class</a>.</p>
|
||
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="methods">Methods<a href="6-1-sections.html#methods" class="hash-link" aria-label="Direct link to Methods" title="Direct link to Methods"></a></h2>
|
||
<p>It is not specified which methods provide the initialization and reinitialization behavior described above. Instead, the information needed to allow portable programs to specialize this behavior is presented as a set of restrictions on the methods a portable program can define. The model is that portable initialization methods have access to the class metaobject when either all or none of the specified initialization has taken effect.</p>
|
||
<p>These restrictions govern the methods that a portable program can define on the generic functions <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_init_i.htm#initialize-instance" target="_blank" rel="noopener noreferrer">initialize-instance</a>, <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reinit.htm#reinitialize-instance" target="_blank" rel="noopener noreferrer">reinitialize-instance</a>, and <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_shared.htm#shared-initialize" target="_blank" rel="noopener noreferrer">shared-initialize</a>. These restrictions apply only to methods on these generic functions for which the first specializer is a subclass of the class <a href="http://www.lispworks.com/documentation/HyperSpec/Body/t_class.htm#class" target="_blank" rel="noopener noreferrer">class</a>. Other portable methods on these generic functions are not affected by these restrictions.</p>
|
||
<ul>
|
||
<li>
|
||
<p>Portable programs must not define methods on <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_shared.htm#shared-initialize" target="_blank" rel="noopener noreferrer">shared-initialize</a>.</p>
|
||
</li>
|
||
<li>
|
||
<p>For <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_init_i.htm#initialize-instance" target="_blank" rel="noopener noreferrer">initialize-instance</a> and <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reinit.htm#reinitialize-instance" target="_blank" rel="noopener noreferrer">reinitialize-instance</a>:</p>
|
||
<ul>
|
||
<li>
|
||
<p>Portable programs must not define primary methods.</p>
|
||
</li>
|
||
<li>
|
||
<p>Portable programs may define around-methods, but these must be extending, not overriding methods.</p>
|
||
</li>
|
||
<li>
|
||
<p>Portable before-methods must assume that when they are run, none of the initialization behavior described above has been completed.</p>
|
||
</li>
|
||
<li>
|
||
<p>Portable after-methods must assume that when they are run, all of the initialization behavior described above has been completed.</p>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<p>The results are undefined if any of these restrictions are violated.</p>
|
||
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="comments-and-remarks">Comments and remarks<a href="6-1-sections.html#comments-and-remarks" class="hash-link" aria-label="Direct link to Comments and remarks" title="Direct link to Comments and remarks"></a></h2>
|
||
<p>This section is named <em>Initialization of Class Metaobjects</em> and appears in Chapter 6 (Generic functions and methods) of the original text. There is <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/initialization-of-class-metaobjects">a section with the same name in Chapter 5 (Concepts) of the original text.</a> When sections are referred to in the text, it is not specified which one.</p>
|
||
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="613-initialization-of-generic-function-metaobjects">6.1.3 Initialization of generic function metaobjects<a href="6-1-sections.html#613-initialization-of-generic-function-metaobjects" class="hash-link" aria-label="Direct link to 6.1.3 Initialization of generic function metaobjects" title="Direct link to 6.1.3 Initialization of generic function metaobjects"></a></h2>
|
||
<!-- -->
|
||
<h1>Initialization of Generic Function Metaobjects</h1>
|
||
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="initialization-of-generic-function-metaobjects-1">Initialization of Generic Function Metaobjects<a href="6-1-sections.html#initialization-of-generic-function-metaobjects-1" class="hash-link" aria-label="Direct link to Initialization of Generic Function Metaobjects" title="Direct link to Initialization of Generic Function Metaobjects"></a></h3>
|
||
<p>A generic function metaobject can be created by calling <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/make-instance">make-instance</a>. The initialization arguments establish the definition of the generic function. A generic function metaobject can be redefined by calling <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reinit.htm#reinitialize-instance" target="_blank" rel="noopener noreferrer">reinitialize-instance</a>. Some classes of generic function metaobject do not support redefinition; in these cases, <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reinit.htm#reinitialize-instance" target="_blank" rel="noopener noreferrer">reinitialize-instance</a> signals an error.</p>
|
||
<p>Initialization of a generic function metaobject must be done by calling <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/make-instance">make-instance</a> and allowing it to call <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_init_i.htm#initialize-instance" target="_blank" rel="noopener noreferrer">initialize-instance</a>. Reinitialization of a generic-function metaobject must be done by calling <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reinit.htm#reinitialize-instance" target="_blank" rel="noopener noreferrer">reinitialize-instance</a>. Portable programs must not call <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_init_i.htm#initialize-instance" target="_blank" rel="noopener noreferrer">initialize-instance</a> directly to initialize a generic function metaobject. Portable programs must not call <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_shared.htm#shared-initialize" target="_blank" rel="noopener noreferrer">shared-initialize</a> directly to initialize or reinitialize a generic function metaobject. Portable programs must not call <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_chg_cl.htm#change-class" target="_blank" rel="noopener noreferrer">change-class</a> to change the class of any generic function metaobject or to turn a non-generic-function object into a generic function metaobject.</p>
|
||
<p>Since metaobject classes may not be redefined, no behavior is specified for the result of calls to <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_upda_1.htm#update-instance-for-redefined-class" target="_blank" rel="noopener noreferrer">update-instance-for-redefined-class</a> on generic function metaobjects. Since the class of a generic function metaobject may not be changed, no behavior is specified for the results of calls to <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_update.htm#update-instance-for-different-class" target="_blank" rel="noopener noreferrer">update-instance-for-different-class</a> on generic function metaobjects.</p>
|
||
<p>During initialization or reinitialization, each initialization argument is checked for errors and then associated with the generic function metaobject. The value can then be accessed by calling the appropriate accessor as shown in the table below. (FIXME<!-- -->:insert<!-- --> anchor).</p>
|
||
<p>This section begins with a description of the error checking and processing of each initialization argument. This is followed by a table showing the generic functions that can be used to access the stored initialization arguments. The section ends with a set of restrictions on portable methods affecting generic function metaobject initialization and reinitialization.</p>
|
||
<p>In these descriptions, the phrase ``this argument defaults to <em>value</em>'' means that when that initialization argument is not supplied, initialization or reinitialization is performed as if <em>value</em> had been supplied. For some initialization arguments this could be done by the use of default initialization arguments, but whether it is done this way is not specified. Implementations are free to define default initialization arguments for specified generic function metaobject classes. Portable programs are free to define default initialization arguments for portable subclasses of the class <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-generic-function">generic-function</a>.</p>
|
||
<p>Unless there is a specific note to the contrary, then during reinitialization, if an initialization argument is not supplied, the previously stored value is left unchanged.</p>
|
||
<ul>
|
||
<li>
|
||
<p>The <code>:argument-precedence-order</code> argument is a list of symbols.</p>
|
||
<p>An error is signaled if this argument appears but the <code>:lambda-list</code> argument does not appear. An error is signaled if this value is not a proper list or if this value is not a permutation of the symbols from the required arguments part of the <code>:lambda-list</code> initialization argument.</p>
|
||
<p>When the generic function is being initialized or reinitialized, and this argument is not supplied, but the <code>:lambda-list</code> argument is supplied, this value defaults to the symbols from the required arguments part of the <code>:lambda-list</code> argument, in the order they appear in that argument. If neither argument is supplied, neither are initialized (see the description of <code>:lambda-list</code>.)</p>
|
||
</li>
|
||
<li>
|
||
<p>The <code>:declarations</code> argument is a list of declarations.</p>
|
||
<p>An error is signaled if this value is not a proper list or if each of its elements is not a legal declaration.</p>
|
||
<p>When the generic function is being initialized, and this argument is not supplied, it defaults to the empty list.</p>
|
||
</li>
|
||
<li>
|
||
<p>The <code>:documentation</code> argument is a string or <code>nil</code>.</p>
|
||
<p>An error is signaled if this value is not a string or <code>nil</code>.</p>
|
||
<p>If the generic function is being initialized, this argument defaults to <code>nil</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p>The <code>:lambda-list</code> argument is a lambda list.</p>
|
||
<p>An error is signaled if this value is not a proper generic function lambda list.</p>
|
||
<p>When the generic function is being initialized, and this argument is not supplied, the generic function's lambda list is not initialized. The lambda list will be initialized later, either when the first method is added to the generic function, or a later reinitialization of the generic function.</p>
|
||
</li>
|
||
<li>
|
||
<p>The <code>:method-combination</code> argument is a method combination metaobject. (But see the note at the end of this page. [RS])</p>
|
||
</li>
|
||
<li>
|
||
<p>The <code>:method-class</code> argument is a class metaobject. (But see the note at the end of this page. [RS])</p>
|
||
<p>An error is signaled if this value is not a subclass of the class <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/method-generic-function">method</a>.</p>
|
||
</li>
|
||
</ul>
|
||
<p>When the generic function is being initialized, and this argument is not supplied, it defaults to the class <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-standard-method.md">standard-method</a>.</p>
|
||
<ul>
|
||
<li>
|
||
<p>The <code>:name</code> argument is an object.</p>
|
||
<p>If the generic function is being initialized, this argument defaults to <code>nil</code>.</p>
|
||
</li>
|
||
</ul>
|
||
<p>After the processing and defaulting of initialization arguments described above, the value of each initialization argument is associated with the generic function metaobject. These values can then be accessed by calling the corresponding generic function. The correspondences are as follows:</p>
|
||
<p>Initialization Argument Generic Function</p>
|
||
<hr>
|
||
<p><code>:argument-precedence-order</code> <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-argument-precedence-order">generic-function-argument-precedence-order</a>
|
||
<code>:declarations</code> <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-declarations">generic-function-declarations</a>
|
||
<code>:documentation</code> <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_docume.htm#documentation" target="_blank" rel="noopener noreferrer">documentation</a>
|
||
<code>:lambda-list</code> <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-lambda-list">generic-function-lambda-list</a>
|
||
<code>:method-combination</code> <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-method-combination">generic-function-method-combination</a>
|
||
<code>:method-class</code> <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-method-class">generic-function-method-class</a>
|
||
<code>:name</code> <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-name">generic-function-name</a></p>
|
||
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="methods">Methods<a href="6-1-sections.html#methods" class="hash-link" aria-label="Direct link to Methods" title="Direct link to Methods"></a></h2>
|
||
<p>It is not specified which methods provide the initialization and reinitialization behavior described above. Instead, the information needed to allow portable programs to specialize this behavior is presented as a set of restrictions on the methods a portable program can define. The model is that portable initialization methods have access to the generic function metaobject when either all or none of the specified initialization has taken effect.</p>
|
||
<p>These restrictions govern the methods that a portable program can define on the generic functions <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_init_i.htm#initialize-instance" target="_blank" rel="noopener noreferrer">initialize-instance</a>, <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reinit.htm#reinitialize-instance" target="_blank" rel="noopener noreferrer">reinitialize-instance</a>, and <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_shared.htm#shared-initialize" target="_blank" rel="noopener noreferrer">shared-initialize</a>. These restrictions apply only to methods on these generic functions for which the first specializer is a subclass of the class <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-generic-function.md">generic-function</a>. Other portable methods on these generic functions are not affected by these restrictions.</p>
|
||
<ul>
|
||
<li>Portable programs must not define methods on <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_shared.htm#shared-initialize" target="_blank" rel="noopener noreferrer">shared-initialize</a>.</li>
|
||
<li>For <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_init_i.htm#initialize-instance" target="_blank" rel="noopener noreferrer">initialize-instance</a> and <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reinit.htm#reinitialize-instance" target="_blank" rel="noopener noreferrer">reinitialize-instance</a>:<!-- -->
|
||
<ul>
|
||
<li>Portable programs must not define primary methods.</li>
|
||
<li>Portable programs may define around-methods, but these must be extending, not overriding methods.</li>
|
||
<li>Portable before-methods must assume that when they are run, none of the initialization behavior described above has been completed.</li>
|
||
<li>Portable after-methods must assume that when they are run, all of the initialization behavior described above has been completed.</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<p>The results are undefined if any of these restrictions are violated.</p>
|
||
<p><strong>Note:</strong></p>
|
||
<p>Nowhere in the chain of functions that initialize generic-function metaobjects is any defaulting behavior for method-combination metaobjects defined. One possible solution to this dilemma is to implement that defaulting behavior here, so that if the <code>:method-combination</code> keyword argument is not supplied, then it defaults to the <code>standard</code> method combination. [RS]</p>
|
||
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="614-initialization-of-method-metaobjects">6.1.4 Initialization of method metaobjects<a href="6-1-sections.html#614-initialization-of-method-metaobjects" class="hash-link" aria-label="Direct link to 6.1.4 Initialization of method metaobjects" title="Direct link to 6.1.4 Initialization of method metaobjects"></a></h2>
|
||
<!-- -->
|
||
<h1>Initialization of Method Metaobjects</h1>
|
||
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="initialization-of-method-metaobjects-1">Initialization of Method Metaobjects<a href="6-1-sections.html#initialization-of-method-metaobjects-1" class="hash-link" aria-label="Direct link to Initialization of Method Metaobjects" title="Direct link to Initialization of Method Metaobjects"></a></h3>
|
||
<p>A method metaobject can be created by calling <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/make-instance">make-instance</a>. The initialization arguments establish the definition of the method. A method metaobject cannot be redefined; calling <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reinit.htm#reinitialize-instance" target="_blank" rel="noopener noreferrer">reinitialize-instance</a> signals an error.</p>
|
||
<p>Initialization of a method metaobject must be done by calling <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/make-instance">make-instance</a> and allowing it to call <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_init_i.htm#initialize-instance" target="_blank" rel="noopener noreferrer">initialize-instance</a>. Portable programs must not call <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_init_i.htm#initialize-instance" target="_blank" rel="noopener noreferrer">initialize-instance</a> directly to initialize a method metaoject. Portable programs must not call <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_shared.htm#shared-initialize" target="_blank" rel="noopener noreferrer">shared-initialize</a> directly to initialize a method metaobject. Portable programs must not call <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_chg_cl.htm#change-class" target="_blank" rel="noopener noreferrer">change-class</a> to change the class of any method metaobject or to turn a non-method object into a method metaobject.</p>
|
||
<p>Since metaobject classes may not be redefined, no behavior is specified for the result of calls to <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_upda_1.htm#update-instance-for-redefined-class" target="_blank" rel="noopener noreferrer">update-instance-for-redefined-class</a> on method metaobjects. Since the class of a method metaobject cannot be changed, no behavior is specified for the result of calls to <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_update.htm#update-instance-for-different-class" target="_blank" rel="noopener noreferrer">update-instance-for-different-class</a> on method metaobjects.</p>
|
||
<p>During initialization, each initialization argument is checked for errors and then associated with the method metaobject. The value can then be accessed by calling the appropriate accessor as shown in the table below (FIXME: insert anchor reference).</p>
|
||
<p>This section begins with a description of the error checking and processing of each initialization argument. This is followed by a table showing the generic functions that can be used to access the stored initialization arguments. The section ends with a set of restrictions on portable methods affecting method metaobject initialization.</p>
|
||
<p>In these descriptions, the phrase ``this argument defaults to <em>value</em>'' means that when that initialization argument is not supplied, initialization or reinitialization is performed as if <em>value</em> had been supplied. For some initialization arguments this could be done by the use of default initialization arguments, but whether it is done this way is not specified. Implementations are free to define default initialization arguments for specified method metaobject classes. Portable programs are free to define default initialization arguments for portable subclasses of the class <a href="http://www.lispworks.com/documentation/HyperSpec/Body/t_method.htm#method" target="_blank" rel="noopener noreferrer">method</a>.</p>
|
||
<ul>
|
||
<li>
|
||
<p>The <code>:qualifiers</code> argument is a list of method qualifiers. An error is signaled if this value is not a proper list, or if any element of the list is not a non-null atom. This argument defaults to the empty list.</p>
|
||
</li>
|
||
<li>
|
||
<p>The <code>:lambda-list</code> argument is the unspecialized lambda list of the method. An error is signaled if this value is not a proper lambda list. If this value is not supplied, an error is signaled.</p>
|
||
</li>
|
||
<li>
|
||
<p>The <code>:specializers</code> argument is a list of the specializer metaobjects for the method. An error is signaled if this value is not a proper list, or if the length of the list differs from the number of required arguments in the <code>:lambda-list</code> argument, or if any element of the list is not a specializer metaobject. If this value is not supplied, an error is signaled.</p>
|
||
</li>
|
||
<li>
|
||
<p>The <code>:function</code> argument is a method function. It must be compatible with the methods on <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/compute-effective-method">compute-effective-method</a> defined for this class of method and generic function with which it will be used. That is, it must accept the same number of arguments as all uses of <a href="../../chap-7/h-h-dictionary/call-method_make-method_local-macro.html">call-method</a> that will call it supply. (See <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/compute-effective-method">compute-effective-method</a> for more information.) An error is signaled if this argument is not supplied.</p>
|
||
</li>
|
||
</ul>
|
||
<ul>
|
||
<li>
|
||
<p>When the method being initialized is an instance of a subclass of <code>standard-accessor-method</code>, the <code>:slot-definition</code> initialization argument must be provided. Its value is the direct slot definition metaobject which defines this accessor method. An error is signaled if the value is not an instance of a subclass of <code>direct-slot-definition</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p>The <code>:documentation</code> argument is a string or <code>nil</code>. An error is signaled if this value is not a string or <code>nil</code>. This argument defaults to <code>nil</code>.</p>
|
||
</li>
|
||
</ul>
|
||
<p>After the processing and defaulting of initialization arguments described above, the value of each initialization argument is associated with the method metaobject. These values can then be accessed by calling the corresponding generic function. The correspondences are as follows:</p>
|
||
<p>Initialization Argument Generic Function</p>
|
||
<hr>
|
||
<div><div><code>:qualifiers</code> <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/method-qualifiers">method-qualifiers</a></div><div> <code>:lambda-list</code> <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/method-lambda-list">method-lambda-list</a></div><div> <code>:specializers</code> <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/method-specializers">method-specializers</a></div><div> <code>:function</code> <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/method-function">method-function</a></div><div> <code>:slot-definition</code> <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/accessor-method-slot-definition">accessor-method-slot-definition</a></div><div> <code>:documentation</code> <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_docume.htm#documentation" target="_blank" rel="noopener noreferrer">documentation</a></div><div><p>Initialization arguments and accessors for method metaobjects.</p></div></div>
|
||
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="methods">Methods<a href="6-1-sections.html#methods" class="hash-link" aria-label="Direct link to Methods" title="Direct link to Methods"></a></h2>
|
||
<p>It is not specified which methods provide the initialization behavior described above. Instead, the information needed to allow portable programs to specialize this behavior is presented in as a set of restrictions on the methods a portable program can define. The model is that portable initialization methods have access to the method metaobject when either all or none of the specified initialization has taken effect.</p>
|
||
<p>These restrictions govern the methods that a portable program can define on the generic functions <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_init_i.htm#initialize-instance" target="_blank" rel="noopener noreferrer">initialize-instance</a> <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reinit.htm#reinitialize-instance" target="_blank" rel="noopener noreferrer">reinitialize-instance</a>, and <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_shared.htm#shared-initialize" target="_blank" rel="noopener noreferrer">shared-initialize</a>. These restrictions apply only to methods on these generic functions for which the first specializer is a subclass of the class <a href="http://www.lispworks.com/documentation/HyperSpec/Body/t_method.htm#method" target="_blank" rel="noopener noreferrer">method</a>. Other portable methods on these generic functions are not affected by these restrictions.</p>
|
||
<ul>
|
||
<li>
|
||
<p>Portable programs must not define methods on <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_shared.htm#shared-initialize" target="_blank" rel="noopener noreferrer">shared-initialize</a> or <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reinit.htm#reinitialize-instance" target="_blank" rel="noopener noreferrer">reinitialize-instance</a>.</p>
|
||
</li>
|
||
<li>
|
||
<p>For <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_init_i.htm#initialize-instance" target="_blank" rel="noopener noreferrer">initialize-instance</a>:</p>
|
||
<ul>
|
||
<li>
|
||
<p>Portable programs must not define primary methods.</p>
|
||
</li>
|
||
<li>
|
||
<p>Portable programs may define around-methods, but these must be extending, not overriding methods.</p>
|
||
</li>
|
||
<li>
|
||
<p>Portable before-methods must assume that when they are run, none of the initialization behavior described above has been completed.</p>
|
||
</li>
|
||
<li>
|
||
<p>Portable after-methods must assume that when they are run, all of the initialization behavior described above has been completed.</p>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<p>The results are undefined if any of these restrictions are violated.</p>
|
||
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="615-initialization-of-slot-definition-metaobjects">6.1.5 Initialization of slot definition metaobjects<a href="6-1-sections.html#615-initialization-of-slot-definition-metaobjects" class="hash-link" aria-label="Direct link to 6.1.5 Initialization of slot definition metaobjects" title="Direct link to 6.1.5 Initialization of slot definition metaobjects"></a></h2>
|
||
<!-- -->
|
||
<p>A slot definition metaobject can be created by calling <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/chap-6/make-instance.html">make-instance</a>. The initialization arguments establish the definition of the slot definition. A slot definition metaobject cannot be redefined; calling <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reinit.htm#reinitialize-instance" target="_blank" rel="noopener noreferrer">reinitialize-instance</a> signals an error.</p>
|
||
<p>Initialization of a slot definition metaobject must be done by calling <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/chap-6/make-instance.html">make-instance</a> and allowing it to call <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_init_i.htm#initialize-instance" target="_blank" rel="noopener noreferrer">initialize-instance</a> Portable programs must not call <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_init_i.htm#initialize-instance" target="_blank" rel="noopener noreferrer">initialize-instance</a> directly to initialize a slot definition metaobject. Portable programs must not call <a href="https://www.lispworks.com/documentation/HyperSpec/Body/f_shared.htm#shared-initialize" target="_blank" rel="noopener noreferrer">shared-initialize</a> directly to initialize a slot definition metaobject. Portable programs must not call <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/chap-6/change-class.html">change-class</a> to change the class of any slot definition metaobject or to turn a non-slot-definition object into a slot definition metaobject.</p>
|
||
<p>Since metaobject classes may not be redefined, no behavior is specified for the result of calls to <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/chap-6/update-instance-for-redefined-class.html">update-instance-for-redefined-class</a> on slot definition metaobjects. Since the class of a slot definition metaobject cannot be changed, no behavior is specified for the result of calls to <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/chap-6/update-instance-for-different-class">update-instance-for-different-class</a> on slot definition metaobjects.</p>
|
||
<p>During initialization, each initialization argument is checked for errors and then associated with the slot definition metaobject. The value can then be accessed by calling the appropriate accessor as shown in <a href="6-1-sections.html#slotd-mo-initargs">the table below</a>.</p>
|
||
<p>This section begins with a description of the error checking and processing of each initialization argument. This is followed by a table showing the generic functions that can be used to access the stored initialization arguments.</p>
|
||
<p>In these descriptions, the phrase ``this argument defaults to <em>value</em>'' means that when that initialization argument is not supplied, initialization is performed as if <em>value</em> had been supplied. For some initialization arguments this could be done by the use of default initialization arguments, but whether it is done this way is not specified. Implementations are free to define default initialization arguments for specified slot definition metaobject classes. Portable programs are free to define default initialization arguments for portable subclasses of the class <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/chap-6/slot-definition.html">slot-definition</a>.</p>
|
||
<ul>
|
||
<li>The <!-- -->:name<!-- --> argument is a slot name. An error is signaled if this argument is not a symbol which can be used as a variable name. An error is signaled if this argument is not supplied.</li>
|
||
<li>The <!-- -->:initform<!-- --> argument is a form. The <!-- -->:initform<!-- --> argument defaults to <strong>nil</strong>. An error is signaled if the <!-- -->:initform<!-- --> argument is supplied, but the <!-- -->:initfunction<!-- --> argument is not supplied.</li>
|
||
<li>The <!-- -->:initfunction<!-- --> argument is a function of zero arguments which, when called, evaluates the <!-- -->:initform<!-- --> in the appropriate lexical environment. The <!-- -->:initfunction<!-- --> argument defaults to false. An error is signaled if the <!-- -->:initfunction<!-- --> argument is supplied, but the <!-- -->:initform<!-- --> argument is not supplied.</li>
|
||
<li>The <!-- -->:type<!-- --> argument is a type specifier name. An error is signaled otherwise. The <!-- -->:type<!-- --> argument defaults to the symbol <strong>t</strong>.</li>
|
||
<li>The <!-- -->:allocation<!-- --> argument is a symbol. An error is signaled otherwise. The <!-- -->:allocation<!-- --> argument defaults to the symbol <!-- -->:instance<!-- -->.</li>
|
||
<li>The <!-- -->:initargs<!-- --> argument is a list of symbols. An error is signaled if this argument is not a proper list, or if any element of this list is not a symbol. The <!-- -->:initargs<!-- --> argument defaults to the empty list.</li>
|
||
<li>The <!-- -->:readers<!-- --> argument is a list of function names. An error is signaled if it is not a proper list, or if any element is not a valid function name. It defaults to the empty list. An error is signaled if this argument is supplied and the metaobject is not a direct slot definition.</li>
|
||
<li>The <!-- -->:writers<!-- --> argument is a list of function names. An error is signaled if it is not a proper list, or if any element is not a valid function name. It defaults to the empty list. An error is signaled if this argument is supplied and the metaobject is not a direct slot definition.</li>
|
||
<li>The <!-- -->:documentation<!-- --> argument is a string or <strong>nil</strong>. An error is signaled otherwise. The <!-- -->:documentation<!-- --> argument defaults to <strong>nil</strong>.</li>
|
||
</ul>
|
||
<p>After the processing and defaulting of initialization arguments described above, the value of each initialization argument is associated with the slot definition metaobject. These values can then be accessed by calling the corresponding generic function. The correspondences are as follows:</p>
|
||
<p>Initialization arguments and accessors for slot definition metaobjects.</p>
|
||
<p>Initialization Argument</p>
|
||
<p>Generic Function</p>
|
||
<p>:name</p>
|
||
<p><a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/chap-6/slot-definition-name.html">slot-definition-name</a></p>
|
||
<p>:initform</p>
|
||
<p><a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/chap-6/slot-definition-initform.html">slot-definition-initform</a></p>
|
||
<p>:initfunction</p>
|
||
<p><a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/chap-6/slot-definition-initfunction.html">slot-definition-initfunction</a></p>
|
||
<p>:type</p>
|
||
<p><a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/chap-6/slot-definition-type.html">slot-definition-type</a></p>
|
||
<p>:allocation</p>
|
||
<p><a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/chap-6/slot-definition-allocation.html">slot-definition-allocation</a></p>
|
||
<p>:initargs</p>
|
||
<p><a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/chap-6/slot-definition-initargs.html">slot-definition-initargs</a></p>
|
||
<p>:readers</p>
|
||
<p><a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/chap-6/slot-definition-readers.html">slot-definition-readers</a></p>
|
||
<p>:writers</p>
|
||
<p><a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/chap-6/slot-definition-writers.html">slot-definition-writers</a></p>
|
||
<p>:documentation</p>
|
||
<p><a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/chap-6/documentation.html">documentation</a></p>
|
||
<p>It is not specified which methods provide the initialization and reinitialization behavior described above. Instead, the information needed to allow portable programs to specialize this behavior is presented as a set of restrictions on the methods a portable program can define. The model is that portable initialization methods have access to the slot definition metaobject when either all or none of the specified initialization has taken effect.</p>
|
||
<p>These restrictions govern the methods that a portable program can define on the generic functions <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_init_i.htm#initialize-instance" target="_blank" rel="noopener noreferrer">initialize-instance</a>, <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reinit.htm#reinitialize-instance" target="_blank" rel="noopener noreferrer">reinitialize-instance</a>, and <a href="https://www.lispworks.com/documentation/HyperSpec/Body/f_shared.htm#shared-initialize" target="_blank" rel="noopener noreferrer">shared-initialize</a>. These restrictions apply only to methods on these generic functions for which the first specializer is a subclass of the class <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/chap-6/slot-definition.html">slot-definition</a>. Other portable methods on these generic functions are not affected by these restrictions.</p>
|
||
<ul>
|
||
<li>Portable programs must not define methods on <a href="https://www.lispworks.com/documentation/HyperSpec/Body/f_shared.htm#shared-initialize" target="_blank" rel="noopener noreferrer">shared-initialize</a> or <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reinit.htm#reinitialize-instance" target="_blank" rel="noopener noreferrer">reinitialize-instance</a>.</li>
|
||
<li>For <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_init_i.htm#initialize-instance" target="_blank" rel="noopener noreferrer">initialize-instance</a>:<!-- -->
|
||
<ul>
|
||
<li>Portable programs must not define primary methods.</li>
|
||
<li>Portable programs may define around-methods, but these must be extending, not overriding methods.</li>
|
||
<li>Portable before-methods must assume that when they are run, none of the initialization behavior described above has been completed.</li>
|
||
<li>Portable after-methods must assume that when they are run, all of the initialization behavior described above has been completed.</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<p>The results are undefined if any of these restrictions are violated.</p>
|
||
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="616-readers-for-class-metaobjects">6.1.6 Readers for class metaobjects<a href="6-1-sections.html#616-readers-for-class-metaobjects" class="hash-link" aria-label="Direct link to 6.1.6 Readers for class metaobjects" title="Direct link to 6.1.6 Readers for class metaobjects"></a></h2>
|
||
<!-- -->
|
||
<h1>readers for Class Metaobjects</h1>
|
||
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="readers-for-class-metaobjects-1">Readers for Class Metaobjects<a href="6-1-sections.html#readers-for-class-metaobjects-1" class="hash-link" aria-label="Direct link to Readers for Class Metaobjects" title="Direct link to Readers for Class Metaobjects"></a></h3>
|
||
<p>In this and the immediately following sections, the ``reader'' generic functions which simply return information associated with a particular kind of metaobject are presented together. General information is presented first, followed by a description of the purpose of each, and ending with the specified methods for these generic functions.</p>
|
||
<p>The reader generic functions which simply return information associated with class metaobjects are presented together in this section.</p>
|
||
<p>Each of the reader generic functions for class metaobjects has the same syntax, accepting one required argument called <em>class</em>, which must be an class metaobject; otherwise, an error is signaled. An error is also signaled if the class metaobject has not been initialized.</p>
|
||
<p>These generic functions can be called by the user or the implementation.</p>
|
||
<p>For any of these generic functions which returns a list, such lists will not be mutated by the implementation. The results are undefined if a portable program allows such a list to be mutated.</p>
|
||
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="functions">Functions<a href="6-1-sections.html#functions" class="hash-link" aria-label="Direct link to Functions" title="Direct link to Functions"></a></h4>
|
||
<hr>
|
||
<p>Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-default-initargs"><strong>class-default-initargs</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-direct-default-initargs"><strong>class-direct-default-initargs</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-direct-slots"><strong>class-direct-slots</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-direct-subclasses"><strong>class-direct-subclasses</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-direct-superclasses"><strong>class-direct-superclasses</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-finalized-p"><strong>class-finalized-p</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-name"><strong>class-name</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-precedence-list"><strong>class-precedence-list</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-prototype"><strong>class-prototype</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/class-slots"><strong>class-slots</strong></a></p>
|
||
<hr>
|
||
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="methods">Methods<a href="6-1-sections.html#methods" class="hash-link" aria-label="Direct link to Methods" title="Direct link to Methods"></a></h4>
|
||
<p>The specified methods for the class metaobject reader generic functions are presented below.</p>
|
||
<p>Each entry in the table indicates a method on one of the reader generic functions, specialized to a specified class. The number in each entry is a reference to the full description of the method. The full descriptions appear after the table.</p>
|
||
<hr>
|
||
<p><code>standard-class an </code>forward-reference <code>built-in-class</code>
|
||
d<code> d-class</code></p>
|
||
<p><code>funcallable-stand ard-class</code></p>
|
||
<p><code>class-default-ini 2 3 4 targs</code></p>
|
||
<p><code>class-direct-defa 1 4 4 ult-initargs</code></p>
|
||
<p><code>class-direct-slot 1 4 4 s</code></p>
|
||
<p><code>class-direct-subc 9 9 7 lasses</code></p>
|
||
<p><code>class-direct-supe 1 4 7 rclasses</code></p>
|
||
<p><code>class-finalized-p 2 6 5 </code></p>
|
||
<p><code>class-name</code> 1 1 8</p>
|
||
<p><code>class-precedence- 2 3 7 list</code></p>
|
||
<p><code>class-prototype</code> 10 10 10</p>
|
||
<p><code>class-slots</code> 2 3 4</p>
|
||
<hr>
|
||
<ol>
|
||
<li>
|
||
<p>This method returns the value which was associated with the class metaobject during initialization or reinitialization.</p>
|
||
</li>
|
||
<li>
|
||
<p>This method returns the value associated with the class metaobject by <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/finalize-inheritance-standard-class"><code>finalize-inheritance</code> (<em>class</em> standard-class)</a> or <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/finalize-inheritance-funcallable-standard-class"><code>finalize-inheritance</code> (<em>class</em> funcallable-standard-class)</a>.</p>
|
||
</li>
|
||
<li>
|
||
<p>This method signals an error.</p>
|
||
</li>
|
||
<li>
|
||
<p>This method returns the empty list.</p>
|
||
</li>
|
||
<li>
|
||
<p>This method returns true.</p>
|
||
</li>
|
||
<li>
|
||
<p>This method returns false.</p>
|
||
</li>
|
||
<li>
|
||
<p>This method returns a value derived from the information in [this table](/meta-object-protocol/table-class-inheritance), except that implementation-specific modifications are permitted as described in <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/implementation-and-user-specialization">section ``Implementation and User Specialization.''</a></p>
|
||
</li>
|
||
<li>
|
||
<p>This method returns the name of the built-in class.</p>
|
||
</li>
|
||
<li>
|
||
<p>This methods returns a value which is maintained by <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/add-direct-subclass-class-class"><code>add-direct-subclass</code> (<em>superclass</em> class) (<em>subclass</em> class)</a> and <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/remove-direct-subclass-class-class"><code>remove-direct-subclass</code> (<em>superclass</em> class) (<em>subclass</em> class)</a> This method can be overridden only if those methods are overridden as well.</p>
|
||
</li>
|
||
<li>
|
||
<p>No behavior is specified for this method beyond that specified for the generic function.</p>
|
||
</li>
|
||
</ol>
|
||
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="comments-and-remarks">Comments and remarks<a href="6-1-sections.html#comments-and-remarks" class="hash-link" aria-label="Direct link to Comments and remarks" title="Direct link to Comments and remarks"></a></h4>
|
||
<p>It is not clear what is meant by the phrase "Each entry in the table indicates a method on one of the reader generic functions" above. It clearly does not mean that each number represents one method, because the same number appears in different rows of the table. One interpretation is that there are exactly 30 methods, but this can not be the case because the specification does not mention a common superclass for <code>standard-class</code> and <code>funcallable-standard-class</code>, so there can not be a single method for the two. Another interpretation, then, is that there are exactly 40 methods. However, in other parts of the document, there is mention of a single method specialized for <code>class</code> that does not correspond to the table above.</p>
|
||
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="617-readers-for-generic-function-metaobjects">6.1.7 Readers for generic function metaobjects<a href="6-1-sections.html#617-readers-for-generic-function-metaobjects" class="hash-link" aria-label="Direct link to 6.1.7 Readers for generic function metaobjects" title="Direct link to 6.1.7 Readers for generic function metaobjects"></a></h2>
|
||
<!-- -->
|
||
<h1>Readers for Generic Function Metaobjects</h1>
|
||
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="readers-for-generic-function-metaobjects-1">Readers for Generic Function Metaobjects<a href="6-1-sections.html#readers-for-generic-function-metaobjects-1" class="hash-link" aria-label="Direct link to Readers for Generic Function Metaobjects" title="Direct link to Readers for Generic Function Metaobjects"></a></h3>
|
||
<p>The reader generic functions which simply return information associated with generic function metaobjects are presented together in this section.</p>
|
||
<p>Each of the reader generic functions for generic function metaobjects has the same syntax, accepting one required argument called <em>generic-function</em>, which must be a generic function metaobject; otherwise, an error is signaled. An error is also signaled if the generic function metaobject has not been initialized.</p>
|
||
<p>These generic functions can be called by the user or the implementation.</p>
|
||
<p>For any of these generic functions which returns a list, such lists will not be mutated by the implementation. The results are undefined if a portable program allows such a list to be mutated.</p>
|
||
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="functions">Functions<a href="6-1-sections.html#functions" class="hash-link" aria-label="Direct link to Functions" title="Direct link to Functions"></a></h4>
|
||
<hr>
|
||
<p>Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-argument-precedence-order"><strong>generic-function-argument-precedence-order</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-declarations"><strong>generic-function-declarations</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-lambda-list"><strong>generic-function-lambda-list</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-method-class"><strong>generic-function-method-class</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-method-combination"><strong>generic-function-method-combination</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-methods"><strong>generic-function-methods</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-name"><strong>generic-function-name</strong></a></p>
|
||
<hr>
|
||
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="methods">Methods<a href="6-1-sections.html#methods" class="hash-link" aria-label="Direct link to Methods" title="Direct link to Methods"></a></h4>
|
||
<p>The specified methods for the generic function metaobject reader generic functions are presented below.</p>
|
||
<hr>
|
||
<p>Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-argument-precedence-order-standard-generic-function"><strong>generic-function-argument-precedence-order</strong> (<em>generic-function</em> standard-generic-function)</a>
|
||
Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-declarations-standard-generic-function"><strong>generic-function-declarations</strong> (<em>generic-function</em> standard-generic-function)</a>
|
||
Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-lambda-list-standard-generic-function"><strong>generic-function-lambda-list</strong> (<em>generic-function</em> standard-generic-function)</a>
|
||
Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-method-class-standard-generic-function"><strong>generic-function-method-class</strong> (<em>generic-function</em> standard-generic-function)</a>
|
||
Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-method-combination-standard-generic-function"><strong>generic-function-method-combination</strong> (<em>generic-function</em> standard-generic-function)</a>
|
||
Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-name-standard-generic-function"><strong>generic-function-name</strong> (<em>generic-function</em> standard-generic-function)</a></p>
|
||
<hr>
|
||
<p>No behavior is specified for these methods beyond that which is specified for their respective generic functions.</p>
|
||
<hr>
|
||
<p>Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/generic-function-methods-standard-generic-function"><strong>generic-function-methods</strong> (<em>generic-function</em> standard-generic-function)</a></p>
|
||
<hr>
|
||
<p>No behavior is specified for this method beyond that which is specified for their respective generic functions.</p>
|
||
<p>The value returned by this method is maintained by <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/add-method-standard-generic-function-standard-method"><code>add-method</code> (<em>generic-function</em> standard-generic-function) (<em>method</em> standard-method)</a> and <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/remove-method-standard-generic-function-standard-method"><code>remove-method</code> (<em>generic-function</em> standard-generic-function) (<em>method</em> standard-method)</a>.</p>
|
||
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="comments-and-remarks">Comments and remarks<a href="6-1-sections.html#comments-and-remarks" class="hash-link" aria-label="Direct link to Comments and remarks" title="Direct link to Comments and remarks"></a></h4>
|
||
<p>The fourth paragraph of the original text reads like this:</p>
|
||
<p><em>The list returned by this generic function will not be mutated by the implementation. The results are undefined if a portable program mutates the list returned by this generic function.</em></p>
|
||
<p>But we think this is an editing error because there is not a single generic function being referred to, rather several generic functions. For that reason, we copied a similar paragraph from the previous section in the book.</p>
|
||
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="618-readers-for-method-metaobjects">6.1.8 Readers for method metaobjects<a href="6-1-sections.html#618-readers-for-method-metaobjects" class="hash-link" aria-label="Direct link to 6.1.8 Readers for method metaobjects" title="Direct link to 6.1.8 Readers for method metaobjects"></a></h2>
|
||
<!-- -->
|
||
<h1>Readers for Method Metaobjects</h1>
|
||
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="readers-for-method-metaobjects-1">Readers for Method Metaobjects<a href="6-1-sections.html#readers-for-method-metaobjects-1" class="hash-link" aria-label="Direct link to Readers for Method Metaobjects" title="Direct link to Readers for Method Metaobjects"></a></h3>
|
||
<p>The reader generic functions which simply return information associated with method metaobjects are presented together here in the format described under <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/readers-for-class-metaobjects">``Readers for Class Metaobjects.''</a></p>
|
||
<p>Each of these reader generic functions have the same syntax, accepting one required argument called <em>method</em>, which must be a method metaobject; otherwise, an error is signaled. An error is also signaled if the method metaobject has not been initialized.</p>
|
||
<p>These generic functions can be called by the user or the implementation.</p>
|
||
<p>For any of these generic functions which returns a list, such lists will not be mutated by the implementation. The results are undefined if a portable program allows such a list to be mutated.</p>
|
||
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="functions">Functions<a href="6-1-sections.html#functions" class="hash-link" aria-label="Direct link to Functions" title="Direct link to Functions"></a></h4>
|
||
<hr>
|
||
<p>Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/method-function"><strong>method-function</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/method-generic-function"><strong>method-generic-function</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/method-lambda-list"><strong>method-lambda-list</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/method-specializers"><strong>method-specializers</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/method-qualifiers"><strong>method-qualifiers</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/accessor-method-slot-definition"><strong>accessor-method-slot-definition</strong></a></p>
|
||
<hr>
|
||
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="methods">Methods<a href="6-1-sections.html#methods" class="hash-link" aria-label="Direct link to Methods" title="Direct link to Methods"></a></h4>
|
||
<p>The specified methods for the method metaobject reader generic functions are presented below.</p>
|
||
<hr>
|
||
<p>Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/method-function-standard-method"><strong>method-function</strong> (<em>method</em> standard-method)</a>
|
||
Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/method-lambda-list-standard-method"><strong>method-lambda-list</strong> (<em>method</em> standard-method)</a>
|
||
Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/method-specializers-standard-method"><strong>method-specializers</strong> (<em>method</em> standard-method)</a>
|
||
Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/method-qualifiers-standard-method"><strong>method-qualifiers</strong> (<em>method</em> standard-method)</a></p>
|
||
<hr>
|
||
<p>No behavior is specified for these methods beyond that which is specified for their respective generic functions.</p>
|
||
<hr>
|
||
<p>Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/method-generic-function-standard-method"><strong>method-generic-function</strong> (<em>method</em> standard-method)</a></p>
|
||
<hr>
|
||
<p>No behavior is specified for this method beyond that which is specified for their respective generic functions.</p>
|
||
<p>The value returned by this method is maintained by <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/add-method-standard-generic-function-standard-method"><code>add-method</code> (<em>generic-function</em> standard-generic-function) (<em>method</em> standard-method)</a> and <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/remove-method-standard-generic-function-standard-method"><code>remove-method</code> (<em>generic-function</em> standard-generic-function) (<em>method</em> standard-method)</a>.</p>
|
||
<hr>
|
||
<p>Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/accessor-method-slot-definition-standard-accessor-method"><strong>accessor-method-slot-definition</strong> (<em>method</em> standard-accessor-method)</a></p>
|
||
<hr>
|
||
<p>No behavior is specified for this method beyond that which is specified for their respective generic functions.</p>
|
||
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="619-readers-for-slot-definition-metaobjects">6.1.9 Readers for slot definition metaobjects<a href="6-1-sections.html#619-readers-for-slot-definition-metaobjects" class="hash-link" aria-label="Direct link to 6.1.9 Readers for slot definition metaobjects" title="Direct link to 6.1.9 Readers for slot definition metaobjects"></a></h2>
|
||
<!-- -->
|
||
<!-- -->
|
||
<h1>Readers for Slot Definition Metaobjects</h1>
|
||
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="readers-for-slot-definition-metaobjects-1">Readers for Slot Definition Metaobjects<a href="6-1-sections.html#readers-for-slot-definition-metaobjects-1" class="hash-link" aria-label="Direct link to Readers for Slot Definition Metaobjects" title="Direct link to Readers for Slot Definition Metaobjects"></a></h3>
|
||
<p>The reader generic functions which simply return information associated with slot definition metaobjects are presented together here in the format described under <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/readers-for-class-metaobjects">``Readers for Class Metaobjects.''</a></p>
|
||
<p>Each of the reader generic functions for slot definition metaobjects has the same syntax, accepting one required argument called <em>slot</em>, which must be a slot definition metaobject; otherwise, an error is signaled. An error is also signaled if the slot definition metaobject has not been initialized.</p>
|
||
<p>These generic functions can be called by the user or the implementation.</p>
|
||
<p>For any of these generic functions which returns a list, such lists will not be mutated by the implementation. The results are undefined if a portable program allows such a list to be mutated.</p>
|
||
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="functions">Functions<a href="6-1-sections.html#functions" class="hash-link" aria-label="Direct link to Functions" title="Direct link to Functions"></a></h4>
|
||
<hr>
|
||
<p>Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-allocation"><strong>slot-definition-allocation</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-initargs"><strong>slot-definition-initargs</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-initform"><strong>slot-definition-initform</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-initfunction"><strong>slot-definition-initfunction</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-name"><strong>slot-definition-name</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-type"><strong>slot-definition-type</strong></a></p>
|
||
<hr>
|
||
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="methods">Methods<a href="6-1-sections.html#methods" class="hash-link" aria-label="Direct link to Methods" title="Direct link to Methods"></a></h4>
|
||
<p>The specified methods for the slot definition metaobject reader generic functions are presented below.</p>
|
||
<hr>
|
||
<p>Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-allocation-standard-slot-definition"><strong>slot-definition-allocation</strong> (<em>slot</em> standard-slot-definition)</a>
|
||
Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-initargs-standard-slot-definition"><strong>slot-definition-initargs</strong> (<em>slot</em> standard-slot-definition)</a>
|
||
Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-initform-standard-slot-definition"><strong>slot-definition-initform</strong> (<em>slot</em> standard-slot-definition)</a>
|
||
Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-initfunction-standard-slot-definition"><strong>slot-definition-initfunction</strong> (<em>slot</em> standard-slot-definition)</a>
|
||
Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-name-standard-slot-definition"><strong>slot-definition-name</strong> (<em>slot</em> standard-slot-definition)</a>
|
||
Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-type-standard-slot-definition"><strong>slot-definition-type</strong> (<em>slot</em> standard-slot-definition)</a></p>
|
||
<hr>
|
||
<p>No behavior is specified for these methods beyond that which is specified for their respective generic functions.</p>
|
||
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="readers-for-direct-slot-definition-metaobjects">Readers for Direct Slot Definition Metaobjects<a href="6-1-sections.html#readers-for-direct-slot-definition-metaobjects" class="hash-link" aria-label="Direct link to Readers for Direct Slot Definition Metaobjects" title="Direct link to Readers for Direct Slot Definition Metaobjects"></a></h3>
|
||
<p>The following additional reader generic functions are defined for direct slot definition metaobjects.</p>
|
||
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="functions-1">Functions<a href="6-1-sections.html#functions-1" class="hash-link" aria-label="Direct link to Functions" title="Direct link to Functions"></a></h4>
|
||
<hr>
|
||
<p>Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-readers"><strong>slot-definition-readers</strong></a>
|
||
Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-writers"><strong>slot-definition-writers</strong></a></p>
|
||
<hr>
|
||
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="methods-1">Methods<a href="6-1-sections.html#methods-1" class="hash-link" aria-label="Direct link to Methods" title="Direct link to Methods"></a></h4>
|
||
<hr>
|
||
<p>Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-readers-standard-direct-slot-definition"><strong>slot-definition-readers</strong> (<em>direct-slot</em> standard-direct-slot-definition)</a>
|
||
Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-writers-standard-direct-slot-definition"><strong>slot-definition-writers</strong> (<em>direct-slot</em> standard-direct-slot-definition)</a></p>
|
||
<hr>
|
||
<p>No behavior is specified for this method beyond that which is specified for their respective generic functions.</p>
|
||
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="readers-for-effective-slot-definition-metaobjects">Readers for Effective Slot Definition Metaobjects<a href="6-1-sections.html#readers-for-effective-slot-definition-metaobjects" class="hash-link" aria-label="Direct link to Readers for Effective Slot Definition Metaobjects" title="Direct link to Readers for Effective Slot Definition Metaobjects"></a></h3>
|
||
<p>The following reader generic function is defined for effective slot definition metaobjects.</p>
|
||
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="functions-2">Functions<a href="6-1-sections.html#functions-2" class="hash-link" aria-label="Direct link to Functions" title="Direct link to Functions"></a></h4>
|
||
<hr>
|
||
<p>Generic Function <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-location"><strong>slot-definition-location</strong></a></p>
|
||
<hr>
|
||
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="methods-2">Methods<a href="6-1-sections.html#methods-2" class="hash-link" aria-label="Direct link to Methods" title="Direct link to Methods"></a></h4>
|
||
<hr>
|
||
<p>Method <a href="https://lisp-docs.github.io/cl-language-reference/meta-object-protocol/slot-definition-location-standard-effective-slot-definition"><strong>slot-definition-location</strong> (<em>effective-slot-definition</em> standard-effective-slot-definition)</a></p>
|
||
<hr></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/lisp-docs/cl-language-reference/tree/main/docs/meta-object-protocol/chap-6/6-1-sections.md" target="_blank" rel="noopener noreferrer" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_Z9Sw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_vwxv"><span class="theme-last-updated">Last updated<!-- --> by <b>daninus14</b></span></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="../../category/chapter-6---generic-functions-and-methods.html"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Chapter 6 - Generic Functions and Methods</div></a><a class="pagination-nav__link pagination-nav__link--next" href="all.html"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Index of all functions and methods</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="6-1-sections.html#612-initialization-of-class-metaobjects" class="table-of-contents__link toc-highlight">6.1.2 Initialization of class metaobjects</a></li><li><a href="6-1-sections.html#613-initialization-of-generic-function-metaobjects" class="table-of-contents__link toc-highlight">6.1.3 Initialization of generic function metaobjects</a></li><li><a href="6-1-sections.html#614-initialization-of-method-metaobjects" class="table-of-contents__link toc-highlight">6.1.4 Initialization of method metaobjects</a></li><li><a href="6-1-sections.html#615-initialization-of-slot-definition-metaobjects" class="table-of-contents__link toc-highlight">6.1.5 Initialization of slot definition metaobjects</a></li><li><a href="6-1-sections.html#616-readers-for-class-metaobjects" class="table-of-contents__link toc-highlight">6.1.6 Readers for class metaobjects</a></li><li><a href="6-1-sections.html#617-readers-for-generic-function-metaobjects" class="table-of-contents__link toc-highlight">6.1.7 Readers for generic function metaobjects</a></li><li><a href="6-1-sections.html#618-readers-for-method-metaobjects" class="table-of-contents__link toc-highlight">6.1.8 Readers for method metaobjects</a></li><li><a href="6-1-sections.html#619-readers-for-slot-definition-metaobjects" class="table-of-contents__link toc-highlight">6.1.9 Readers for slot definition metaobjects</a></li></ul></div></div></div></div></main></div></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a href="../../../docs/tutorial.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Common Lisp Tutorial</a></li><li class="footer__item"><a href="../../index.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Common Lisp Technical Reference</a></li><li class="footer__item"><a href="../../../docs/help.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Help</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://stackoverflow.com/questions/tagged/common-lisp" target="_blank" rel="noopener noreferrer" class="footer__link-item">Stack Overflow<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/hhk46CE" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://www.reddit.com/r/common_lisp" target="_blank" rel="noopener noreferrer" class="footer__link-item">Reddit<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://irclog.tymoon.eu/libera/commonlisp" target="_blank" rel="noopener noreferrer" class="footer__link-item">IRC<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">More</div><ul class="footer__items clean-list"><li class="footer__item"><a href="../../../blog.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Blog</a></li><li class="footer__item"><a href="https://github.com/lisp-docs/lisp-docs.github.io" target="_blank" rel="noopener noreferrer" class="footer__link-item">Tutorial and General Content GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://github.com/lisp-docs/cl-language-reference/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Technical Reference GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="../../../docs/contribute.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Contribute to the Docs</a></li></ul></div><div class="col footer__col"><div class="footer__title">Common Lisp Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a href="../../../docs/about.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">About</a></li><li class="footer__item"><a href="../../../docs/whylisp.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Why Lisp</a></li><li class="footer__item"><a href="../../../docs/getting-started.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Getting Started</a></li><li class="footer__item"><a href="../../../docs/faq.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">FAQ</a></li><li class="footer__item"><a href="../../../docs/help.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Getting Help</a></li><li class="footer__item"><a href="../../../docs/howto.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">How To Guides</a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 Common Lisp Docs, MIT License (see GitHub Repo).</div></div></div></footer></div>
|
||
</body>
|
||
</html> |