/** * If the prefix is set, then only properties which start with this * prefix string will be recorded. If regex is not set and if this * is never set, or it is set to an empty string or <tt>null</tt>, * then all properties will be recorded. * * <p>For example, if the attribute is set as:</p> * <pre><echoproperties prefix="ant." /></pre> * then the property "ant.home" will be recorded, but "ant-example" * will not. * * @param prefix The new prefix value */ public void setPrefix(String prefix) { if (prefix != null && !prefix.isEmpty()) { this.prefix = prefix; PropertySet ps = new PropertySet(); ps.setProject(getProject()); ps.appendPrefix(prefix); addPropertyset(ps); } }
/** * If the regex is set, then only properties whose names match it * will be recorded. If prefix is not set and if this is never set, * or it is set to an empty string or <tt>null</tt>, then all * properties will be recorded. * * <p>For example, if the attribute is set as:</p> * <pre><echoproperties prefix=".*ant.*" /></pre> * then the properties "ant.home" and "user.variant" will be recorded, * but "ant-example" will not. * * @param regex The new regex value * * @since Ant 1.7 */ public void setRegex(String regex) { if (regex != null && !regex.isEmpty()) { this.regex = regex; PropertySet ps = new PropertySet(); ps.setProject(getProject()); ps.appendRegex(regex); addPropertyset(ps); } }
PropertySet ps = new PropertySet(); PropertySet.BuiltinPropertySetName sys = new PropertySet.BuiltinPropertySetName(); sys.setValue("system");
public PropertySet createPropertyset() { if (propertyset == null) { propertyset = new PropertySet(); } return propertyset; }
public PropertySet createPropertyset() { if (propertyset == null) { propertyset = new PropertySet(); } return propertyset; }