This section describes how XPath values supplied in a call to a Java extension function are converted to Java values.
There are three phases of decision-making:
First, Saxon decides which method to call. If there are several methods with the same name, this takes into account the static types of the supplied arguments and the Java types expected by the method signature. However, this process does not influence how the arguments are subsequently converted.
Saxon allocates a converter, wherever possible at compile time, based on the static type of the supplied argument and the Java type expected by the method.
At run-time the converter performs the conversion from the supplied value to the required type. Some converters will make further decisions based on run-time types at this stage.
These stages are described further in the following pages.