Method from org.apache.tools.ant.ProjectComponent Detail: |
public Object clone() throws CloneNotSupportedException {
ProjectComponent pc = (ProjectComponent) super.clone();
pc.setLocation(getLocation());
pc.setProject(getProject());
return pc;
}
|
public String getDescription() {
return description;
}
Returns the description of the current action. |
public Location getLocation() {
return location;
}
Returns the file/location where this task was defined. |
public Project getProject() {
return project;
}
Returns the project to which this component belongs. |
public void log(String msg) {
log(msg, Project.MSG_INFO);
}
Logs a message with the default (INFO) priority. |
public void log(String msg,
int msgLevel) {
if (getProject() != null) {
getProject().log(msg, msgLevel);
} else {
// 'reasonable' default, if the component is used without
// a Project ( for example as a standalone Bean ).
// Most ant components can be used this way.
if (msgLevel < = Project.MSG_INFO) {
System.err.println(msg);
}
}
}
Logs a message with the given priority. |
public void setDescription(String desc) {
description = desc;
}
Sets a description of the current action. This may be used for logging
purposes. |
public void setLocation(Location location) {
this.location = location;
}
Sets the file/location where this task was defined. |
public void setProject(Project project) {
this.project = project;
}
Sets the project object of this component. This method is used by
Project when a component is added to it so that the component has
access to the functions of the project. It should not be used
for any other purpose. |