org.apache.tools.ant

Class ProjectComponent

Known Direct Subclasses:
Commandline.Argument, Concat.TextElement, ConditionBase, DataType, Http, IsFalse, IsReference, IsSet, IsTrue, Javadoc.ExtensionInfo, LineTokenizer, Message, Socket, Task, TokenFilter.ChainableReaderFilter, TokenFilter.ContainsString, TokenFilter.DeleteCharacters, TokenFilter.FileTokenizer, TokenFilter.StringTokenizer

public abstract class ProjectComponent
extends java.lang.Object

Base class for components of a project, including tasks and data types. Provides common facilities.

Field Summary

protected Project
project
Deprecated. You should not be directly accessing this variable directly.

Constructor Summary

ProjectComponent()
Sole constructor.

Method Summary

Project
getProject()
Returns the project to which this component belongs.
void
log(String msg)
Logs a message with the default (INFO) priority.
void
log(String msg, int msgLevel)
Logs a message with the given priority.
void
setProject(Project project)
Sets the project object of this component.

Field Details

project

protected Project project

Deprecated. You should not be directly accessing this variable directly. You should access project object via the getProject() or setProject() accessor/mutators.

Project object of this component.

Constructor Details

ProjectComponent

public ProjectComponent()
Sole constructor.

Method Details

getProject

public Project getProject()
Returns the project to which this component belongs.

Returns:
the components's project.


log

public void log(String msg)
Logs a message with the default (INFO) priority.

Parameters:
msg - The message to be logged. Should not be null.


log

public void log(String msg,
                int msgLevel)
Logs a message with the given priority.

Parameters:
msg - The message to be logged. Should not be null.
msgLevel - the message priority at which this message is to be logged.


setProject

public void setProject(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.

Parameters:
project - Project in whose scope this component belongs. Must not be null.


Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.