Changeset 13628
- Timestamp:
- 10/13/11 05:05:20 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/doc/manual/abcl.tex
r13626 r13628 6 6 \begin{document} 7 7 \title{A Manual for Armed Bear Common Lisp} 8 \date{October 2, 2011}8 \date{October 13, 2011} 9 9 \author{Mark~Evenson, Erik~Huelsmann, Alessio~Stalla, Ville~Voutilainen} 10 10 … … 22 22 \chapter{Running} 23 23 24 ABCLis packaged as a single jar file usually named either24 \textsc{ABCL} is packaged as a single jar file usually named either 25 25 ``abcl.jar'' or something like``abcl-0.28.0.jar'' if you are using a 26 26 versioned package from your system vendor. This byte archive can be 27 27 executed under the control of a suitable JVM by using the ``-jar'' 28 28 option to parse the manifest, and select the named class 29 ( org.armedbear.lisp.Main) for excution:29 (\code{org.armedbear.lisp.Main}) for excution: 30 30 31 31 \begin{listing-shell} … … 47 47 \section{Options} 48 48 49 ABCL supports the following options:49 ABCL supports the following command line options: 50 50 51 51 \begin{verbatim} … … 88 88 89 89 \section{ANSI Common Lisp} 90 ABCLis currently a non-conforming ANSI Common Lisp implementation due90 \textsc{ABCL} is currently a non-conforming ANSI Common Lisp implementation due 91 91 to the following issues: 92 92 93 93 \begin{itemize} 94 \item Missing statement of conformance in accompanying documentation95 94 \item The generic function signatures of the DOCUMENTATION symbol do 96 95 not match the CLHS. … … 101 100 102 101 \section{Contemporary Common Lisp} 103 In addition to ANSI conformance, ABCLstrives to implement features102 In addition to ANSI conformance, \textsc{ABCL} strives to implement features 104 103 expected of a contemporary Common Lisp. 105 104 \begin{itemize} … … 124 123 \section{Lisp to Java} 125 124 126 ABCL offers a number of mechanisms to interact with Java from 127 its lisp environment. It allows calling methods (and static methods) of 128 Java objects, manipulation of fields and static fields and construction 129 of new Java objects. 130 131 When calling Java routines, some values will automatically be converted 132 by the FFI from Lisp values to Java values. These conversions typically 133 apply to strings, integers and floats. Other values need to be converted 134 to their Java equivalents by the programmer before calling the Java 135 object method. Java values returned to Lisp are also generally converted 136 back to their Lisp counterparts. Some operators make an exception to this 137 rule and do not perform any conversion; those are the ``raw'' counterparts 138 of certain FFI functions and are recognizable by their name ending with 139 \code{-RAW}. 125 \textsc{ABCL} offers a number of mechanisms to interact with Java from its 126 Lisp environment. It allows calling both instance and static methods 127 of Java objects, manipulation of instance and static fields on Java 128 objects, and construction of new Java objects. 129 130 When calling Java routines, some values will automatically be 131 converted by the FFI \footnote{FFI stands for Foreign Function 132 Interface which is the term of art which describes how a Lisp 133 implementation encapsulates invocation in other languages.} from 134 Lisp values to Java values. These conversions typically apply to 135 strings, integers and floats. Other values need to be converted to 136 their Java equivalents by the programmer before calling the Java 137 object method. Java values returned to Lisp are also generally 138 converted back to their Lisp counterparts. Some operators make an 139 exception to this rule and do not perform any conversion; those are 140 the ``raw'' counterparts of certain FFI functions and are recognizable 141 by their name ending with \code{-RAW}. 140 142 141 143 \subsection{Lowlevel Java API} … … 143 145 There's a higher level Java API defined in the 144 146 \ref{topic:Higher level Java API: JSS}(JSS package) which is available 145 in the contrib/directory. This package is described later in this147 in the \code{contrib/} directory. This package is described later in this 146 148 document. This section covers the lower level API directly available 147 149 after evaluating \code{(require 'JAVA)}. … … 190 192 \subsubsection{Dynamic dispatch: caveats} 191 193 192 Dynamic dispatch is performed by using the Java reflection API. Generally 193 it works fine, but there are corner cases where the API does not correctly 194 reflect all the details involved in calling a Java method. An example is 195 the following Java code: 194 Dynamic dispatch is performed by using the Java reflection 195 API \footnote{The Java reflection API is found in the 196 \code{java.lang.reflect} package}. Generally the dispatch works 197 fine, but there are corner cases where the API does not correctly 198 reflect all the details involved in calling a Java method. An example 199 is the following Java code: 196 200 197 201 \begin{listing-java} … … 202 206 \end{listing-java} 203 207 204 even though the method \code{hasMoreElements } is public in \code{Enumeration},208 even though the method \code{hasMoreElements()} is public in \code{Enumeration}, 205 209 the above code fails with 206 210 … … 228 232 except that the dynamic dispatch part is not shown. 229 233 230 To avoid such pitfalls, all Java objects in ABCLcarry an extra234 To avoid such pitfalls, all Java objects in \textsc{ABCL} carry an extra 231 235 field representing the ``intended class'' of the object. That is the class 232 236 that is used first by \code{JAVA:JCALL} and similar to resolve methods;
Note: See TracChangeset
for help on using the changeset viewer.