use of org.apache.tools.ant.util.ContainerMapper in project ant by apache.
the class Mapper method add.
/**
* Add a nested <code>FileNameMapper</code>.
* @param fileNameMapper the <code>FileNameMapper</code> to add.
*/
public void add(FileNameMapper fileNameMapper) {
if (isReference()) {
throw noChildrenAllowed();
}
if (container == null) {
if (type == null && classname == null) {
container = new CompositeMapper();
} else {
FileNameMapper m = getImplementation();
if (m instanceof ContainerMapper) {
container = (ContainerMapper) m;
} else {
throw new BuildException(String.valueOf(m) + " mapper implementation does not support nested mappers!");
}
}
}
container.add(fileNameMapper);
setChecked(false);
}
Aggregations