*/
public <T> Expression<T> function(String name, Class<T> type, Expression<?>... args){
if (args != null && args.length > 0){
List<org.eclipse.persistence.expressions.Expression> params = new ArrayList<org.eclipse.persistence.expressions.Expression>();
for (int index = 1; index < args.length; ++index){
Expression x = args[index];
params.add(((InternalSelection)x).getCurrentNode());
}
return new FunctionExpressionImpl<T>(metamodel, type, ((InternalSelection)args[0]).getCurrentNode().getFunctionWithArguments(name, params), buildList(args), name);
}else{