Exemple #1
0
 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;
   }
 }
Exemple #2
0
  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;
  }