# 22. Virtuoso Functions Guide - jvm_ref_import

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Virtuoso Functions Guide
Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
import_jar
internal_to_sql_type
internal_type
internal_type_name
isarray
isbinary
isblob
isdouble
isentity
isfloat
isinteger
isnull
isnumeric
isstring
iszero
jvm_ref_import
make_string
sign
stringdate
stringtime
udt_defines_field
udt_get
udt_implements_metho...
udt_instance_of
udt_set
unimport_jar
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY
Functions Index

## jvm_ref_import

Creates XML description of Java class
varchar jvm_ref_import (in files any, in classes any);
Description

This function will returns an XML description of the selected classes from the source files.

The XML produced by the JVM_REF_IMPORT can be supplied to the predefined XSL style sheet __javavm_type to produce the CREATE TYPE statements:

    select xslt ('__javavm_type', xml_tree_doc (JVM_REF_IMPORT (files, classes)));

This can also be achieve directly using a single call to:

    IMPORT_JAR (in files any, in classes any)

Parameters
files – Null, string or vector of strings. This can contain one or many Java .class files, .zip or .jar files to pick classes from. Null means only the classes specified in the classes argument regardless of their physical location.
classes – Wildcard string or a vector of strings specifying which classes to describe in the resulting XML.
Return Types

A varchar of XML that describes the selected Java classes.

Examples

    JVM_REF_IMPORT (NULL, vector ('java.lang.Object', 'java.lang.System'));

This will return an XML describing the Java classes java.lang.Object and java.lang.System. Because the java.lang.System class is a subclass of java.lang.Object the XML description for java.lang.System will contain a reference to java.lang.Object and only the methods/members defined in java.lang.System (because the methods/members of java.lang.Object will be inherited).

    JVM_REF_IMPORT (NULL, 'java.lang.System');

As opposed to the above example this will create an XML description only for the java.lang.System class, but will also add the inherited methods/members (from java.lang.Object) as if they were methods/members of the java.lang.System class.

See Also

import_jar()