public SupplierExpression(Supplier<T> supplier) { Assert.notNull(supplier, "'function' must not be null."); this.supplier = supplier; this.readOnlyException = new EvaluationException(getExpressionString(), "SupplierExpression is a 'read only' Expression implementation"); }
@Override public <C> C getValue(Class<C> desiredResultType) throws EvaluationException { return getValue(this.defaultContext, desiredResultType); }
@Override public Object getValue(Object rootObject) throws EvaluationException { return getValue(); }
public SupplierExpression(Supplier<T> supplier) { Assert.notNull(supplier, "'function' must not be null."); this.supplier = supplier; this.readOnlyException = new EvaluationException(getExpressionString(), "SupplierExpression is a 'read only' Expression implementation"); }
@Override public <C> C getValue(Object rootObject, Class<C> desiredResultType) throws EvaluationException { return getValue(this.defaultContext, rootObject, desiredResultType); }
@Override public Object getValue(EvaluationContext context, Object rootObject) throws EvaluationException { return getValue(rootObject); }
@Override public <C> C getValue(EvaluationContext context, Object rootObject, Class<C> desiredResultType) throws EvaluationException { return ExpressionUtils.convertTypedValue(context, new TypedValue(getValue(rootObject)), desiredResultType); }
@Override public <C> C getValue(EvaluationContext context, Class<C> desiredResultType) throws EvaluationException { return ExpressionUtils.convertTypedValue(context, new TypedValue(getValue(context)), desiredResultType); }
@Override public <C> C getValue(Object rootObject, Class<C> desiredResultType) throws EvaluationException { return getValue(this.defaultContext, rootObject, desiredResultType); }
@Override public Object getValue(Object rootObject) throws EvaluationException { return getValue(); }
@Override public Object getValue(EvaluationContext context, Object rootObject) throws EvaluationException { return getValue(rootObject); }
@Override public <C> C getValue(Class<C> desiredResultType) throws EvaluationException { return getValue(this.defaultContext, desiredResultType); }
@Override public <C> C getValue(EvaluationContext context, Object rootObject, Class<C> desiredResultType) throws EvaluationException { return ExpressionUtils.convertTypedValue(context, new TypedValue(getValue(rootObject)), desiredResultType); }
@Override public <C> C getValue(EvaluationContext context, Class<C> desiredResultType) throws EvaluationException { return ExpressionUtils.convertTypedValue(context, new TypedValue(getValue(context)), desiredResultType); }