Changeset 13625
- Timestamp:
- 10/10/11 20:56:39 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/doc/manual/abcl.tex
r13624 r13625 260 260 % \end{itemize} 261 261 262 \subsubsection{Calling Java class static methods} 263 264 Like with non-static methods, references to static methods can be acquired 265 by using the \code{JAVA:JMETHOD} primitive. In order to call this method, 266 it's not possible to use the \code{JAVA:JCALL} primitive however: there's a 267 separate API to retrieve a reference to static methods. This 268 primitive is called \code{JAVA:JSTATIC}. 269 270 Like \code{JAVA:JCALL}, \code{JAVA:JSTATIC} supports dynamic dispatch by 271 passing the name of the method as a string instead of passing a method reference. 272 The parameter values should be values to pass in the function call instead of 273 a specification of classes for each parameter. 274 262 275 \subsubsection{Parameter matching for FFI dynamic dispatch} 263 276 264 277 The algorithm used to resolve the best matching method given the name 265 278 and the arguments' types is the same as described in the Java Language 266 Specification. Any devia nceshould be reported as a bug.279 Specification. Any deviation should be reported as a bug. 267 280 268 281 % ###TODO reference to correct JLS section 282 283 \subsubsection{Instantiating Java objects} 284 285 Java objects can be instantiated (created) from Lisp by calling 286 a constructor from the class of the object to be created. The same way 287 \code{JAVA:JMETHOD} is used to acquire a method reference, the 288 \code{JAVA:JCONSTRUCTOR} primitive can be used to acquire a constructor 289 reference. It's arguments specify the types of arguments of the constructor 290 method the same way as with \code{JAVA:JMETHOD}. 291 292 The constructor can't be passed to \code{JAVA:JCALL}, but instead should 293 be passed as an argument to \code{JAVA:JNEW}. 269 294 270 295 \section{Lisp from Java}
Note: See TracChangeset
for help on using the changeset viewer.