@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001 The Apache Software Foundation. All rights
* Copyright (c) 2001,2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -55,30 +55,36 @@
package org.apache.tools.ant;
/**
* Base class for components of a project, including tasks and data types. Provides
* common facilities.
* Base class for components of a project, including tasks and data types.
* Provides common facilities.
*
* @author <a href="mailto:conor@apache.org">Conor MacNeill</a>
*/
public abstract class ProjectComponent {
/** Project object of this component. */
protected Project project = null;
/** Sole constructor. */
public ProjectComponent() {
}
/**
* 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
* P roject 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.
*
* @param project Project in whose scope this component belongs.
* Must not be <code>null</code>.
*/
public void setProject(Project project) {
this.project = project;
}
/**
* Get the Project to which this component belongs
* Returns the project to which this component belongs.
*
* @return the components's project.
*/
@@ -87,18 +93,18 @@ public abstract class ProjectComponent {
}
/**
* Log a message with the default (INFO) priority.
* Logs a message with the default (INFO) priority.
*
* @param the message to be logged .
* @param msg The message to be logged. Should not be <code>null</code> .
*/
public void log(String msg) {
log(msg, Project.MSG_INFO);
}
/**
* Log a mesage with the give priority.
* Logs a mesage with the given priority.
*
* @param the message to be logged .
* @param msg The message to be logged. Should not be <code>null</code> .
* @param msgLevel the message priority at which this message is to be logged.
*/
public void log(String msg, int msgLevel) {
@@ -107,4 +113,3 @@ public abstract class ProjectComponent {
}
}
}