(theParameterTypes[0] == XPathContext.class);
firstParam = (usesContext ? 1 : 0);
}
argumentConverters = new PJConverter[argument.length];
if (firstArg != 0) {
SequenceType st = PJConverter.getEquivalentItemType(theClass);
if (st != null) {
RoleLocator role = new RoleLocator(
RoleLocator.FUNCTION, getFunctionName(), 0);
argument[0] = TypeChecker.staticTypeCheck(
argument[0], st, false, role, visitor);
}
argumentConverters[0] = PJConverter.allocate(
config, argument[0].getItemType(th), argument[0].getCardinality(), theClass);
}
int j = firstParam;
for (int i = firstArg; i < argument.length; i++) {
SequenceType st = PJConverter.getEquivalentItemType(theParameterTypes[j]);
if (st != null) {
RoleLocator role = new RoleLocator(
RoleLocator.FUNCTION, getFunctionName(), i);
argument[i] = TypeChecker.staticTypeCheck(
argument[i], st, false, role, visitor);