FunctionPackage: javatools.jlinkerToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version

jnew

Arguments: class-ref &rest args

This function calls a Java constructor with the given arguments.

If the first (class-ref) argument is a string, a symbol or a class reference, we look for a constructor with the number of arguments given. If a unique constructor can be selected, then that constructor is called. Otherwise a continuable error is signaled to allow an appropriate constructor to be selected.

Otherwise, the class-ref argument is assumed to be a constructor reference. The constructor is called with the given arguments.

The value returned by calling any constructor is always a remote reference. This is the case even for java.lang.String instances which are normally represented by their Lisp equivalent. The following call may be used to extract the string representation of a String instance:

(jcall "concat" x "")

The compiler macro associated with the function allows compile-time collection of java class names and method signatures. This information is used to generate a file of class and method definitions that may be loaded to initialize an application, and avoid the class and method lookup overhead in the body of the application (see jlookup).

See jlinker.htm for more information on the jLinker facility.


Copyright (c) 1998-2009, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.1. This page was not revised from the 8.0 page.
Created 2009.7.29.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version