/** * get the assignment string * This is not ready for insertion into a property file without following * the escaping rules of the properties class. * @return a string of the form key=value. * @throws BuildException if key or value are unassigned */ public String getContent() throws BuildException { validate(); return key.trim() + "=" + value.trim(); }
/** * Cache the system properties and set the system properties to the * new values. * @throws BuildException if Security prevented this operation. */ public void setSystem() throws BuildException { try { sys = System.getProperties(); Properties p = new Properties(); for (String name : sys.stringPropertyNames()) { String value = sys.getProperty(name); if (value != null) { p.put(name, value); } } p.putAll(mergePropertySets()); for (Environment.Variable v : variables) { v.validate(); p.put(v.getKey(), v.getValue()); } System.setProperties(p); } catch (SecurityException e) { throw new BuildException("Cannot modify system properties", e); } }
/** * Sets a property for the Pack200 packer. */ public void addConfiguredProperty(Environment.Variable prop) { prop.validate(); properties.put(prop.getKey(), prop.getValue()); }
/** * Sets a property for the Pack200 packer. */ public void addConfiguredProperty(Environment.Variable prop) { prop.validate(); properties.put(prop.getKey(), prop.getValue()); }
/** * Sets a property for the Pack200 unpacker. */ public void addConfiguredProperty(Environment.Variable prop) { prop.validate(); properties.put(prop.getKey(), prop.getValue()); }