예제 #1
0
 public void setRoot(String s) {
   String root = Static.trim2(s, null);
   if (root != null) {
     this.accu = new Element(s);
     this.accu.addContent("\n");
   }
 }
예제 #2
0
 /**
  * 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;
 }
예제 #3
0
  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);
    }
  }
예제 #4
0
 public void setPattern(String pattern) {
   this.pattern = Static.trim2(pattern, this.pattern);
   this.doinit = true;
 }
예제 #5
0
 public void setSrc(String s) {
   this.src = Static.trim2(s, this.src);
 }
예제 #6
0
 public void setDst(String s) {
   this.dst = Static.trim2(s, this.src);
 }
예제 #7
0
 /**
  * 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);
 }
예제 #8
0
 public void setVersion(String s) {
   this.version_regex = Static.trim2(s, this.version_regex);
 }
예제 #9
0
 public void setGroupid(String s) {
   this.gid_regex = Static.trim2(s, this.gid_regex);
 }
예제 #10
0
 public void setType(String s) {
   this.type_regex = Static.trim2(s, this.type_regex);
 }
예제 #11
0
 public void setBasename(String s) {
   this.bname_regex = Static.trim2(s, this.bname_regex);
 }
예제 #12
0
 public void setScope(String s) {
   this.scope_regex = Static.trim2(s, this.scope_regex);
 }
예제 #13
0
 public void setAlias(String s) {
   this.alias_regex = Static.trim2(s, this.alias_regex);
 }