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

get-superclass-and-interfaces-tree Function

Summary

Returns the superclasses and implemented interfaces of a supplied Java class.

Package

lw-ji

Signature

get-superclass-and-interfaces-tree java-class => java-class-tree

Arguments
java-class
Values
java-class-tree
A tree.
Description

The function get-superclass-and-interfaces-tree takes a Java class and returns of its superclasses and implemented interfaces. It is used by the importing interface to generate a tree which is then output as argument to ensure-lisp-classes-from-tree. It may be useful on its own, as a quick way of finding the tree for a class.

java-class must be a Java class, that is a jobject corresponding to a class. Typically that would be the result of find-java-class, but it can be the result of your calls to Java methods. Using the Java methods "getInterfaces", "getSuperclass" and "getName" in the Java class "java.lang.Class", get-superclass-and-interfaces-tree constructs a complete tree of the superclasses and implemented interfaces of the class and its superclasses.

Each node in the tree is a vector of three elements:

get-superclass-and-interfaces-tree returns the node for the class itself.

See also

ensure-lisp-classes-from-tree
generate-java-class-definitions


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:46