String name = chain.get(0).getName();
if (mapContext.getExpressionDeclarations() != null && mapContext.getExpressionDeclarations().containsKey(name)) {
return new ExprDeclaredNodeImpl(mapContext.getExpressionDeclarations().get(name), chain.get(0).getParameters());
}
if (mapContext.getScripts() != null && mapContext.getScripts().containsKey(name)) {
return new ExprNodeScript(mapContext.getConfiguration().getEngineDefaults().getScripts().getDefaultDialect(), mapContext.getScripts().get(name), chain.get(0).getParameters());
}
}
return new ExprDotNode(chain,
mapContext.getConfiguration().getEngineDefaults().getExpression().isDuckTyping(),
mapContext.getConfiguration().getEngineDefaults().getExpression().isUdfCache());