Objects-Classes-and-Modules.xhtml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">
  3. <head>
  4. <title>Object, Classes and Modules</title>
  5. <link rel="stylesheet" type="text/css" href="docbook-epub.css"/>
  6. <link rel="stylesheet" type="text/css" href="kawa.css"/>
  7. <script src="kawa-ebook.js" type="text/javascript"/>
  8. <meta name="generator" content="DocBook XSL-NS Stylesheets V1.79.1"/>
  9. <link rel="prev" href="Overall-Index.xhtml" title="Index"/>
  10. <link rel="next" href="Defining-new-classes.xhtml" title="Defining new classes"/>
  11. </head>
  12. <body>
  13. <header/>
  14. <section class="chapter" title="Object, Classes and Modules" epub:type="chapter" id="Objects-Classes-and-Modules">
  15. <div class="titlepage">
  16. <div>
  17. <div>
  18. <h2 class="title">Object, Classes and Modules</h2>
  19. </div>
  20. </div>
  21. </div>
  22. <p>Kawa provides various ways to define, create, and access Java objects.
  23. Here are the currently supported features.
  24. </p>
  25. <p>The Kawa module system is based on the features of the Java class system.
  26. </p>
  27. <p class="synopsis" kind="Syntax"><span class="kind">Syntax</span><span class="ignore">: </span><a id="idm139667871890720" class="indexterm"/> <code class="function">this</code></p>
  28. <div class="blockquote">
  29. <blockquote class="blockquote">
  30. <p>Returns the "this object" - the current instance of the current class.
  31. The current implementation is incomplete, not robust, and not
  32. well defined. However, it will have to do for now.
  33. Note: "<code class="literal">this</code>" is a macro, not a variable, so you have to write
  34. it using parentheses: ‘<code class="literal">(this)</code>’. A planned extension will
  35. allow an optional class specifier (needed for nested clases).
  36. </p>
  37. </blockquote>
  38. </div>
  39. </section>
  40. <footer>
  41. <div class="navfooter">
  42. <ul>
  43. <li>
  44. <b class="toc">
  45. <a href="Defining-new-classes.xhtml">Defining new classes</a>
  46. </b>
  47. </li>
  48. <li>
  49. <b class="toc">
  50. <a href="Anonymous-classes.xhtml">Anonymous classes</a>
  51. </b>
  52. </li>
  53. <li>
  54. <b class="toc">
  55. <a href="Enumerations.xhtml">Enumeration types</a>
  56. </b>
  57. </li>
  58. <li>
  59. <b class="toc">
  60. <a href="Annotations.xhtml">Annotations of declarations</a>
  61. </b>
  62. </li>
  63. <li>
  64. <b class="toc">
  65. <a href="Module-classes.xhtml">Modules and how they are compiled to classes</a>
  66. </b>
  67. </li>
  68. <li>
  69. <b class="toc">
  70. <a href="Importing.xhtml">Importing from a library</a>
  71. </b>
  72. </li>
  73. <li>
  74. <b class="toc">
  75. <a href="Record-types.xhtml">Record types</a>
  76. </b>
  77. </li>
  78. <li>
  79. <b class="toc">
  80. <a href="Dynamic-records.xhtml">Creating New Record Types On-the-fly</a>
  81. </b>
  82. </li>
  83. <li>
  84. <b class="toc">
  85. <a href="Method-operations.xhtml">Calling Java methods from Scheme</a>
  86. </b>
  87. </li>
  88. <li>
  89. <b class="toc">
  90. <a href="Allocating-objects.xhtml">Allocating objects</a>
  91. </b>
  92. </li>
  93. <li>
  94. <b class="toc">
  95. <a href="Field-operations.xhtml">Accessing object fields</a>
  96. </b>
  97. </li>
  98. <li>
  99. <b class="toc">
  100. <a href="Mangling.xhtml">Mapping Scheme names to Java names</a>
  101. </b>
  102. </li>
  103. <li>
  104. <b class="toc">
  105. <a href="Scheme-types-in-Java.xhtml">Scheme types in Java</a>
  106. </b>
  107. </li>
  108. <li>
  109. <b class="toc">
  110. <a href="Array-operations.xhtml">Using Java Arrays</a>
  111. </b>
  112. </li>
  113. <li>
  114. <b class="toc">
  115. <a href="Loading-Java-functions-into-Scheme.xhtml">Loading Java functions into Scheme</a>
  116. </b>
  117. </li>
  118. <li>
  119. <b class="toc">
  120. <a href="Evaluating-Scheme-expressions-from-Java.xhtml">Evaluating Scheme expressions from Java</a>
  121. </b>
  122. </li>
  123. </ul>
  124. <p>
  125. Up: <a accesskey="u" href="pt01.xhtml">Part . Reference Documentation</a></p>
  126. <p>
  127. Previous: <a accesskey="p" href="Types.xhtml">Types</a></p>
  128. <p>
  129. Next: <a accesskey="n" href="XML-tools.xhtml">Working with XML and HTML</a></p>
  130. </div>
  131. </footer>
  132. </body>
  133. </html>