/** * Set the type of <code>FileNameMapper</code> to use. * @param type the <code>MapperType</code> enumerated attribute. */ public void setType(MapperType type) { if (isReference()) { throw tooManyAttributes(); } this.type = type; }
/** * Set the class name of the FileNameMapper to use. * @param classname the name of the class */ public void setClassname(String classname) { if (isReference()) { throw tooManyAttributes(); } this.classname = classname; }
/** * Set the argument to FileNameMapper.setTo * @param to the to attribute to pass to the FileNameMapper */ public void setTo(String to) { if (isReference()) { throw tooManyAttributes(); } this.to = to; }
/** * Set the argument to FileNameMapper.setFrom * @param from the from attribute to pass to the FileNameMapper */ public void setFrom(String from) { if (isReference()) { throw tooManyAttributes(); } this.from = from; }
/** * Make this Mapper instance a reference to another Mapper. * * <p>You must not set any other attribute if you make it a * reference.</p> * @param r the reference to another mapper * @throws BuildException if other attributes are set */ @Override public void setRefid(Reference r) throws BuildException { if (type != null || from != null || to != null) { throw tooManyAttributes(); } super.setRefid(r); }
/** * Set the classpath to load the FileNameMapper through (attribute). * @param classpath the classpath */ public void setClasspath(Path classpath) { if (isReference()) { throw tooManyAttributes(); } if (this.classpath == null) { this.classpath = classpath; } else { this.classpath.append(classpath); } }
/** * Set the classpath to load the FileNameMapper through via * reference (attribute). * @param ref the reference to the FileNameMapper */ public void setClasspathRef(Reference ref) { if (isReference()) { throw tooManyAttributes(); } createClasspath().setRefid(ref); }