private ParserContext getParserContext(XelContext ctx) { if (ctx != null) { final FunctionMapper mapper = ctx.getFunctionMapper(); if (mapper != null) { final Collection c = mapper.getClassNames(); if (c != null && !c.isEmpty()) { final ParserContext pctx = new ParserContext(); for (Iterator it = c.iterator(); it.hasNext();) { final String nm = (String)it.next(); pctx.addImport(nm, mapper.resolveClass(nm)); } return pctx; } } } return null; } }