concept-reinit.tex 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. % -*- Mode: TeX -*-
  2. The generic function \funref{reinitialize-instance} may be used to change
  3. the values of \term{slots} according to initialization arguments.
  4. The process of reinitialization changes the values of some \term{slots} and
  5. performs any user-defined actions. It does not modify the structure
  6. of an \term{instance} to add or delete \term{slots},
  7. and it does not use any \kwd{initform} forms to initialize \term{slots}.
  8. The generic function \funref{reinitialize-instance} may be called
  9. directly. It takes one required argument, the \term{instance}. It also
  10. takes any number of initialization arguments to be used by \term{methods} for
  11. \funref{reinitialize-instance} or for \funref{shared-initialize}. The
  12. arguments after the required \term{instance} must form an
  13. \term{initialization argument list}.
  14. There is a system-supplied primary \term{method} for
  15. \funref{reinitialize-instance} whose \term{parameter specializer} is
  16. \theclass{standard-object}. First this \term{method} checks the validity of
  17. initialization arguments and signals an error if an initialization
  18. argument is supplied that is not declared as valid.
  19. (For more information, \seesection\DeclaringInitargValidity.)
  20. Then it calls the generic function
  21. \funref{shared-initialize} with the following arguments: the \term{instance},
  22. \nil, and the initialization arguments it received.
  23. \beginsubsection{Customizing Reinitialization}
  24. \term{Methods} for \funref{reinitialize-instance} may be defined to specify
  25. actions to be taken when an \term{instance} is updated. If only
  26. \term{after methods} for \funref{reinitialize-instance} are defined,
  27. they will be run after the system-supplied primary \term{method} for
  28. initialization and therefore will not interfere with the default behavior of
  29. \funref{reinitialize-instance}.
  30. \term{Methods} for \funref{shared-initialize} may be defined to customize
  31. \term{class} redefinition. For more information, \seesection\SharedInitialize.
  32. \endsubsection%{Customizing Reinitialization}