use of lucee.runtime.interpreter.ref.func.BIFCall in project Lucee by lucee.
the class BIF method call.
@Override
public Object call(PageContext pageContext, Object[] args, boolean doIncludePath) throws PageException {
ArrayList<FunctionLibFunctionArg> flfas = flf.getArg();
FunctionLibFunctionArg flfa;
List<Ref> refs = new ArrayList<Ref>();
for (int i = 0; i < args.length; i++) {
if (i >= flfas.size())
throw new ApplicationException("too many Attributes in function call [" + flf.getName() + "]");
flfa = flfas.get(i);
refs.add(new Casting(flfa.getTypeAsString(), flfa.getType(), args[i]));
}
BIFCall call = new BIFCall(flf, refs.toArray(new Ref[refs.size()]));
return call.getValue(pageContext);
}
Aggregations