/** * 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); }
/** * Set the classpath to load the FileNameMapper through (nested element). * @return a path object to be configured */ public Path createClasspath() { if (isReference()) { throw noChildrenAllowed(); } if (this.classpath == null) { this.classpath = new Path(getProject()); } setChecked(false); return this.classpath.createPath(); }