Methods Summary |
---|
public void | addParam(Parameter param)Add a Parameter.
parameters.addElement(param);
|
public Path | createClasspath()Set the classpath to load the FilterReader through (nested element).
if (isReference()) {
throw noChildrenAllowed();
}
if (this.classpath == null) {
this.classpath = new Path(getProject());
}
return this.classpath.createPath();
|
public java.lang.String | getClassName()Get the className attribute.
return className;
|
public Path | getClasspath()Get the classpath.
return classpath;
|
public Parameter[] | getParams()The parameters for this filter.
Parameter[] params = new Parameter[parameters.size()];
parameters.copyInto(params);
return params;
|
public void | setClassName(java.lang.String className)Set the className attribute.
this.className = className;
|
public void | setClasspath(Path classpath)Set the classpath to load the FilterReader through (attribute).
if (isReference()) {
throw tooManyAttributes();
}
if (this.classpath == null) {
this.classpath = classpath;
} else {
this.classpath.append(classpath);
}
|
public void | setClasspathRef(Reference r)Set the classpath to load the FilterReader through via
reference (attribute).
if (isReference()) {
throw tooManyAttributes();
}
createClasspath().setRefid(r);
|
public void | setRefid(Reference r)Makes this instance in effect a reference to another AntFilterReader
instance.
You must not set another attribute or nest elements inside
this element if you make it a reference.
if (!parameters.isEmpty() || className != null
|| classpath != null) {
throw tooManyAttributes();
}
// change this to get the objects from the other reference
Object o = r.getReferencedObject(getProject());
if (o instanceof AntFilterReader) {
AntFilterReader afr = (AntFilterReader) o;
setClassName(afr.getClassName());
setClasspath(afr.getClasspath());
Parameter[] p = afr.getParams();
if (p != null) {
for (int i = 0; i < p.length; i++) {
addParam(p[i]);
}
}
} else {
String msg = r.getRefId() + " doesn\'t refer to a FilterReader";
throw new BuildException(msg);
}
super.setRefid(r);
|