public boolean isAvailable(StructuredQName functionName, int arity) { String key = functionName.getClarkName(); List<FunctionEntry> functions = index.getFunctions(key); if (functions != null) { for (FunctionEntry fe : functions) { if (arity == -1) { return true; } if (arity >= fe.getMinArgs() && arity <= fe.getMaxArgs()) { return true; } } } return false; }
public boolean isAvailable(StructuredQName functionName, int arity) { String key = functionName.getClarkName(); List<FunctionEntry> functions = index.getFunctions(key); if (functions != null) { for (FunctionEntry fe : functions) { if (arity == -1) { return true; } if (arity >= fe.getMinArgs() && arity <= fe.getMaxArgs()) { return true; } } } return false; }
if (fe.isJava()) { int argCount = paramElements.size(); if (fe.getMinArgs() >= argCount && fe.getMaxArgs() <= argCount) { TEClassLoader cl = engine.getClassLoader(opts .getSourcesName());
if (fe.isJava()) { int argCount = paramElements.size(); if (fe.getMinArgs() >= argCount && fe.getMaxArgs() <= argCount) { TEClassLoader cl = engine.getClassLoader(opts .getSourcesName());
public Expression bind(StructuredQName functionName, Expression[] staticArgs, StaticContext env) throws XPathException { if (functionName.getNamespaceURI().equals(Test.TE_NS) && functionName.getLocalName().equals("get-type")) { return new GetTypeFunctionCall(functionName, staticArgs, env); } String key = functionName.getClarkName(); List<FunctionEntry> functions = index.getFunctions(key); int argCount = staticArgs.length; if (functions != null) { for (FunctionEntry fe : functions) { if (argCount >= fe.getMinArgs() && argCount <= fe.getMaxArgs()) { if (fe.isJava()) { TEJavaFunctionCall fc = new TEJavaFunctionCall(fe, functionName, staticArgs, env); return fc; } else { TEXSLFunctionCall fc = new TEXSLFunctionCall(fe, functionName, staticArgs, env); return fc; } } } } // Just return null rather than throw an exception, because there may be // another function library that supports this function return null; }
public Expression bind(StructuredQName functionName, Expression[] staticArgs, StaticContext env) throws XPathException { if (functionName.getNamespaceURI().equals(Test.TE_NS) && functionName.getLocalName().equals("get-type")) { return new GetTypeFunctionCall(functionName, staticArgs, env); } String key = functionName.getClarkName(); List<FunctionEntry> functions = index.getFunctions(key); int argCount = staticArgs.length; if (functions != null) { for (FunctionEntry fe : functions) { if (argCount >= fe.getMinArgs() && argCount <= fe.getMaxArgs()) { if (fe.isJava()) { TEJavaFunctionCall fc = new TEJavaFunctionCall(fe, functionName, staticArgs, env); return fc; } else { TEXSLFunctionCall fc = new TEXSLFunctionCall(fe, functionName, staticArgs, env); return fc; } } } } // Just return null rather than throw an exception, because there may be // another function library that supports this function return null; }
methods = new Method[fe.getMaxArgs() + 1]; for (int i = fe.getMinArgs(); i <= fe.getMaxArgs(); i++) { try { methods[i] = Misc.getMethod(fe.getClassName(),
methods = new Method[fe.getMaxArgs() + 1]; for (int i = fe.getMinArgs(); i <= fe.getMaxArgs(); i++) { try { methods[i] = Misc.getMethod(fe.getClassName(),