org.apache.tools.ant

Class ProjectComponent

public abstract class ProjectComponent extends Object

Base class for components of a project, including tasks and data types. Provides common facilities.
Field Summary
protected Projectproject
Project object of this component.
Constructor Summary
ProjectComponent()
Sole constructor.
Method Summary
ProjectgetProject()
Returns the project to which this component belongs.
voidlog(String msg)
Logs a message with the default (INFO) priority.
voidlog(String msg, int msgLevel)
Logs a message with the given priority.
voidsetProject(Project project)
Sets the project object of this component.

Field Detail

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 Detail

ProjectComponent

public ProjectComponent()
Sole constructor.

Method Detail

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-2007 Apache Software Foundation. All Rights Reserved.