All Manuals > LispWorks User Guide and Reference Manual > 41 The LW-JI Package

NextPrevUpTopContentsIndex

find-java-class

Function
Summary

Finds a Java class and returns a jobject representing it

Package

lw-ji

Signature

find-java-class class-sym-or-string &optional errorp => result

Arguments

class-sym-or-string

A symbol or a string.

Values

result

A jobject or nil.

Description

The function find-java-class finds a Java class and returns a jobject representing it.

If class-sym-or-string is a string, it should be the full name of class. find-java-class allows the '.' in the names to be replaced by '/' (which is how the class is actually looked up). find-java-class also recognizes class names of primitives (for example, "int"), and can also find classes for arrays, using the internal syntax with leading '[' character(s).

If class-sym-or-string is a symbol, it can be a keyword specifying a primitive class (see the table in Types and conversion between Lisp and Java), one of :object or t to specify java.lang.Object, :string to specify java.lang.String, or a symbol which is set to a string, in which case the value is used to search for a class.

If find-java-class finds the Java class, it returns a jobject representing it.

Otherwise, if errorp is non-nil it signals an error, otherwise it returns nil. The default value of errorp is t.

Notes

For most of the Java interface, you do not actually need to find the class.


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex