public void setRoot(String s) { String root = Static.trim2(s, null); if (root != null) { this.accu = new Element(s); this.accu.addContent("\n"); } }
/** * compile a string a regular expression pattern. In case of an error, the internal variable * <code>errmsg</code> is set. * * @return nil if <code>s</code> can't be translated. */ protected final Pattern compile(String S) { String s = S; Pattern P = null; if (s != null && s.trim().length() > 0) { try { if (this.glob) { s = Static.patternAsRegex(s); P = Pattern.compile(s, this.flags); } else { P = Static.patterncompile(s, this.flags); } } catch (Exception e) { this.errmsg = e.toString(); } } return P; }
private void initFilter() throws BuildException { try { if (this.filter == null && this.pattern != null) { this.filter = Static.patterncompile(this.pattern, 0); } this.ffilter = new FileFilter() { public boolean accept(File file) { String s; if (file.isDirectory()) return true; if (XmlMerger.this.filter == null) return true; s = file.getName(); if (s == null) return false; return XmlMerger.this.filter.matcher(s).matches(); } }; } catch (Exception e) { throw new BuildException(e); } }
public void setPattern(String pattern) { this.pattern = Static.trim2(pattern, this.pattern); this.doinit = true; }
public void setSrc(String s) { this.src = Static.trim2(s, this.src); }
public void setDst(String s) { this.dst = Static.trim2(s, this.src); }
/** * Use attribute <code>refid</code> to change the reference holding all known dependencies. * * @param s */ public void setRefid(String s) { this.refid = Static.trim2(s, this.refid); }
public void setVersion(String s) { this.version_regex = Static.trim2(s, this.version_regex); }
public void setGroupid(String s) { this.gid_regex = Static.trim2(s, this.gid_regex); }
public void setType(String s) { this.type_regex = Static.trim2(s, this.type_regex); }
public void setBasename(String s) { this.bname_regex = Static.trim2(s, this.bname_regex); }
public void setScope(String s) { this.scope_regex = Static.trim2(s, this.scope_regex); }
public void setAlias(String s) { this.alias_regex = Static.trim2(s, this.alias_regex); }