/** * @since EL 3.0 */ public void notifyBeforeEvaluation(String expression) { for (EvaluationListener listener : listeners) { try { listener.beforeEvaluation(this, expression); } catch (Throwable t) { Util.handleThrowable(t); // Ignore - no option to log } } }
/** * @since EL 3.0 */ public void notifyAfterEvaluation(String expression) { for (EvaluationListener listener : listeners) { try { listener.afterEvaluation(this, expression); } catch (Throwable t) { Util.handleThrowable(t); // Ignore - no option to log } } }
/** * @since EL 3.0 */ public void notifyPropertyResolved(Object base, Object property) { for (EvaluationListener listener : listeners) { try { listener.propertyResolved(this, base, property); } catch (Throwable t) { Util.handleThrowable(t); // Ignore - no option to log } } }
/** * Notify interested listeners that an expression has been evaluated. * * @param expression The expression that was evaluated * * @since EL 3.0 */ public void notifyAfterEvaluation(String expression) { for (EvaluationListener listener : listeners) { try { listener.afterEvaluation(this, expression); } catch (Throwable t) { Util.handleThrowable(t); // Ignore - no option to log } } }
/** * Notify interested listeners that a property has been resolved. * * @param base The object on which the property was resolved * @param property The property that was resolved * * @since EL 3.0 */ public void notifyPropertyResolved(Object base, Object property) { for (EvaluationListener listener : listeners) { try { listener.propertyResolved(this, base, property); } catch (Throwable t) { Util.handleThrowable(t); // Ignore - no option to log } } }
/** * Notify interested listeners that an expression will be evaluated. * * @param expression The expression that will be evaluated * * @since EL 3.0 */ public void notifyBeforeEvaluation(String expression) { for (EvaluationListener listener : listeners) { try { listener.beforeEvaluation(this, expression); } catch (Throwable t) { Util.handleThrowable(t); // Ignore - no option to log } } }
/** * Notify interested listeners that a property has been resolved. * * @param base The object on which the property was resolved * @param property The property that was resolved * * @since EL 3.0 */ public void notifyPropertyResolved(Object base, Object property) { for (EvaluationListener listener : listeners) { try { listener.propertyResolved(this, base, property); } catch (Throwable t) { Util.handleThrowable(t); // Ignore - no option to log } } }
/** * Notify interested listeners that an expression will be evaluated. * * @param expression The expression that will be evaluated * * @since EL 3.0 */ public void notifyBeforeEvaluation(String expression) { for (EvaluationListener listener : listeners) { try { listener.beforeEvaluation(this, expression); } catch (Throwable t) { Util.handleThrowable(t); // Ignore - no option to log } } }
/** * Notify interested listeners that an expression has been evaluated. * * @param expression The expression that was evaluated * * @since EL 3.0 */ public void notifyAfterEvaluation(String expression) { for (EvaluationListener listener : listeners) { try { listener.afterEvaluation(this, expression); } catch (Throwable t) { Util.handleThrowable(t); // Ignore - no option to log } } }
@Override public Object getValue(ELContext context, Object base, Object property) { Objects.requireNonNull(context); if (base == null || property == null) { return null; } context.setPropertyResolved(base, property); Method m = this.property(context, base, property).read(context); try { return m.invoke(base, (Object[]) null); } catch (InvocationTargetException e) { Throwable cause = e.getCause(); Util.handleThrowable(cause); throw new ELException(Util.message(context, "propertyReadError", base.getClass().getName(), property.toString()), cause); } catch (Exception e) { throw new ELException(e); } }
@Override public Object getValue(ELContext context, Object base, Object property) { Objects.requireNonNull(context); if (base == null || property == null) { return null; } context.setPropertyResolved(base, property); Method m = this.property(context, base, property).read(context); try { return m.invoke(base, (Object[]) null); } catch (InvocationTargetException e) { Throwable cause = e.getCause(); Util.handleThrowable(cause); throw new ELException(Util.message(context, "propertyReadError", base.getClass().getName(), property.toString()), cause); } catch (Exception e) { throw new ELException(e); } }
@Override public Class<?> getType(ELContext context, Object base, Object property) { Objects.requireNonNull(context); if (base != null || !(property instanceof String)) { return null; } String beanName = (String) property; try { if (beanNameResolver.isNameResolved(beanName)) { Class<?> result = beanNameResolver.getBean(beanName).getClass(); context.setPropertyResolved(base, property); return result; } } catch (Throwable t) { Util.handleThrowable(t); throw new ELException(t); } return null; }
@Override public Class<?> getType(ELContext context, Object base, Object property) { Objects.requireNonNull(context); if (base != null || !(property instanceof String)) { return null; } String beanName = (String) property; try { if (beanNameResolver.isNameResolved(beanName)) { Class<?> result = beanNameResolver.getBean(beanName).getClass(); context.setPropertyResolved(base, property); return result; } } catch (Throwable t) { Util.handleThrowable(t); throw new ELException(t); } return null; }
@Override public Class<?> getType(ELContext context, Object base, Object property) { if (context == null) { throw new NullPointerException(); } if (base != null || !(property instanceof String)) { return null; } String beanName = (String) property; try { if (beanNameResolver.isNameResolved(beanName)) { Class<?> result = beanNameResolver.getBean(beanName).getClass(); context.setPropertyResolved(base, property); return result; } } catch (Throwable t) { Util.handleThrowable(t); throw new ELException(t); } return null; }
@Override public Object getValue(ELContext context, Object base, Object property) { Objects.requireNonNull(context); if (base != null || !(property instanceof String)) { return null; } String beanName = (String) property; if (beanNameResolver.isNameResolved(beanName)) { try { Object result = beanNameResolver.getBean(beanName); context.setPropertyResolved(base, property); return result; } catch (Throwable t) { Util.handleThrowable(t); throw new ELException(t); } } return null; }
@Override public Object getValue(ELContext context, Object base, Object property) { if (context == null) { throw new NullPointerException(); } if (base != null || !(property instanceof String)) { return null; } String beanName = (String) property; if (beanNameResolver.isNameResolved(beanName)) { try { Object result = beanNameResolver.getBean((String) property); context.setPropertyResolved(base, property); return result; } catch (Throwable t) { Util.handleThrowable(t); throw new ELException(t); } } return null; }
@Override public Object getValue(ELContext context, Object base, Object property) { Objects.requireNonNull(context); if (base != null || !(property instanceof String)) { return null; } String beanName = (String) property; if (beanNameResolver.isNameResolved(beanName)) { try { Object result = beanNameResolver.getBean(beanName); context.setPropertyResolved(base, property); return result; } catch (Throwable t) { Util.handleThrowable(t); throw new ELException(t); } } return null; }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { Objects.requireNonNull(context); if (base == null || property == null) { return; } context.setPropertyResolved(base, property); if (this.readOnly) { throw new PropertyNotWritableException(Util.message(context, "resolverNotWriteable", base.getClass().getName())); } Method m = this.property(context, base, property).write(context); try { m.invoke(base, value); } catch (InvocationTargetException e) { Throwable cause = e.getCause(); Util.handleThrowable(cause); throw new ELException(Util.message(context, "propertyWriteError", base.getClass().getName(), property.toString()), cause); } catch (Exception e) { throw new ELException(e); } }
@Override public boolean isReadOnly(ELContext context, Object base, Object property) { Objects.requireNonNull(context); if (base != null || !(property instanceof String)) { // Return value undefined return false; } String beanName = (String) property; if (beanNameResolver.isNameResolved(beanName)) { boolean result; try { result = beanNameResolver.isReadOnly(beanName); } catch (Throwable t) { Util.handleThrowable(t); throw new ELException(t); } context.setPropertyResolved(base, property); return result; } // Return value undefined return false; }
@Override public boolean isReadOnly(ELContext context, Object base, Object property) { Objects.requireNonNull(context); if (base != null || !(property instanceof String)) { // Return value undefined return false; } String beanName = (String) property; if (beanNameResolver.isNameResolved(beanName)) { boolean result; try { result = beanNameResolver.isReadOnly(beanName); } catch (Throwable t) { Util.handleThrowable(t); throw new ELException(t); } context.setPropertyResolved(base, property); return result; } // Return value undefined return false; }