/** * Checks whether javax.el is on the classpath and a {@link ExpressionFactory} can be constructed * * @return if javax.el can be used */ public static Boolean isSupported() { return isSupported(ELExpressionFactory.class.getClassLoader()); }
private ELEngine getELEngine() { if (elEngine == null) { if (ELExpressionFactory.isSupported()) { if (RuntimeUtils.isOSGi()) { ClassLoader classLoader = getClass().getClassLoader(); return new TcclELEngine(ELExpressionFactory.newInstance(classLoader), classLoader); } else { return new DefaultELEngine(ELExpressionFactory.newInstance()); } } else { return new NoopELEngine(); } } else { return elEngine; } }
/** * Checks whether javax.el is on the classpath and a {@link ExpressionFactory} can be constructed * * @return if javax.el can be used */ public static Boolean isSupported() { return isSupported(ELExpressionFactory.class.getClassLoader()); }
private ELEngine getELEngine() { if (elEngine == null) { if (ELExpressionFactory.isSupported()) { if (RuntimeUtils.isOSGi()) { ClassLoader classLoader = getClass().getClassLoader(); return new TcclELEngine(ELExpressionFactory.newInstance(classLoader), classLoader); } else { return new DefaultELEngine(ELExpressionFactory.newInstance()); } } else { return new NoopELEngine(); } } else { return elEngine; } }
private ELEngine createELEngine() { ELEngine answer; ClassLoader appcl = camelContext.getApplicationContextClassLoader(); ClassLoader auxcl = appcl == null ? DozerEndpoint.class.getClassLoader() : appcl; if (ELExpressionFactory.isSupported(auxcl)) { if (RuntimeUtils.isOSGi()) { answer = new TcclELEngine(ELExpressionFactory.newInstance(auxcl), auxcl); } else { answer = new DefaultELEngine(ELExpressionFactory.newInstance()); } } else { LOG.warn("Expressions are not supported by Dozer. Are you missing javax.el dependency?"); answer = new NoopELEngine(); } return answer; } }