public boolean set(String key, String value, boolean quiet) { try { beeLine.getReflector().invoke(this, "set" + key, new Object[] {value}); return true; } catch (Exception e) { if (!quiet) { beeLine.error(beeLine.loc("error-setting", new Object[] {key, e})); } return false; } }
public Properties toProperties() throws IllegalAccessException, InvocationTargetException, ClassNotFoundException { Properties props = new Properties(); String[] names = propertyNames(); for (int i = 0; names != null && i < names.length; i++) { Object o = beeLine.getReflector().invoke(this, "get" + names[i], new Object[0]); props.setProperty(PROPERTY_PREFIX + names[i], o == null ? "" : o.toString()); } beeLine.debug("properties: " + props.toString()); return props; }