* @param engine Engine
* @return The new instance
*/
public static ExpressionParser createExpressionParser(TokenContext context, Engine engine)
{
ExpressionParser ep = new ExpressionParser(new TokenContextToExpressionContextAdapter(context));
if (engine != null)
{
ep.setPersistenceContextProvider(engine.getPersistenceContextProvider());
}
return ep;