Annotation Type ToolkitLibraries
-
@Target(value=TYPE) @Retention(value=RUNTIME) @Documented @Inherited public @interface ToolkitLibraries
Declare a set of Java class library paths to be added at execution time to the toolkit's class loader. The toolkit's class loader is used for loading SPL Java native functions declared with theFunction
annotation.A path may be one of:
- A valid URL referring to a jar file or directory .
- An absolute file path.
- A file path relative to the root directory of the SPL toolkit.
Environment variables in the path are not suppored.
If a file path ends with "
/*
" then all the files in the specified directory with the extension.jar
or.JAR
will be added to the toolkit's class loader. The expansion occurs at execution time.
Otherwise the file path is assumed to refer to a jar file or a directory.Example of including all the jar files in
$DERBY_INSTALL/lib
.@ToolkitLibraries({"@DERBY_INSTALL@/lib/*"}) public class DerbyFunctions
The search order for classes referenced from an SPL Java native function is:
- The classes provided by the virtual machine's Java runtime.
- The Java Operator API classes and the dependent jars provided by the SPL Java runtime.
- The jar or directory containing the method annotated with
Function
, including any dependent classes from the jar's manifestClass-Path
entry. - The classes specified by the containing class's
@ToolkitLibraries
annotation. Order withinvalue()
is preserved, with the path listed first being earliest in the search order.
When a path defined by
@ToolkitLibraries
ends with '/*
' then all jar files in that directory are included in the search order. The order within the set of jars loaded though this mechanism is not defined, but they remain ordered with respect to the path that included them. For example:@ToolkitLibraries({"opt/a/*", "opt/b/*"})
will include all the jars inopt/a
andopt/b
, and all jars inopt/a
are earlier in the search path than those inopt/b
.- Since:
- IBM Streams Version 4.2
-
-
Required Element Summary
Required Elements Modifier and Type Required Element and Description java.lang.String[]
value
The paths to be added to the toolkit's class loader at execution time to be used when searching for referenced Java classes.
-