/** * {@inheritDoc} */ public Double getVar(String varName) { Field field = getVariableField(varName); if (field == null) { return null; } try { field.setAccessible(true); return field.getDouble(this); } catch (IllegalAccessException e) { throw new RuntimeException(e); } }
/** * {@inheritDoc} */ public Double getVar(String varName) { Field field = getVariableField(varName); if (field == null) { return null; } try { field.setAccessible(true); return field.getDouble(this); } catch (IllegalAccessException e) { throw new RuntimeException(e); } }
/** * {@inheritDoc} */ public void setVar(String varName, Double value) throws JiffleRuntimeException { Field field = getVariableField(varName); if (field == null) { throw new JiffleRuntimeException("Undefined variable: " + varName); } try { field.setAccessible(true); field.setDouble(this, value == null ? Double.NaN : value); _imageScopeVarsInitialized = false; } catch (IllegalAccessException e) { throw new RuntimeException(e); } }
/** * {@inheritDoc} */ public void setVar(String varName, Double value) throws JiffleRuntimeException { Field field = getVariableField(varName); if (field == null) { throw new JiffleRuntimeException("Undefined variable: " + varName); } try { field.setAccessible(true); field.setDouble(this, value == null ? Double.NaN : value); _imageScopeVarsInitialized = false; } catch (IllegalAccessException e) { throw new RuntimeException(e); } }