Google

ProjectComponent (Apache Ant API)

org.apache.tools.ant
Class ProjectComponent


java.lang.Object

  |

  +--org.apache.tools.ant.ProjectComponent

Direct Known Subclasses:
ConditionBase, DataType, Http, IsFalse, IsSet, IsTrue, Javadoc.ExtensionInfo, Message, Socket, Task

public abstract class ProjectComponent
extends java.lang.Object

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

Author:
Conor MacNeill

Field Summary
protected  Project project
          Project object of this component.
 
Constructor Summary
ProjectComponent()
          Sole constructor.
 
Method Summary
 Project getProject()
          Returns the project to which this component belongs.
 void log(java.lang.String msg)
          Logs a message with the default (INFO) priority.
 void log(java.lang.String msg, int msgLevel)
          Logs a mesage with the given priority.
 void setProject(Project project)
          Sets the project object of this component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

project


protected Project project
Project object of this component.

Constructor Detail

ProjectComponent


public ProjectComponent()
Sole constructor.

Method Detail

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.

getProject


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

Returns:
the components's project.

log


public void log(java.lang.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(java.lang.String msg,
                int msgLevel)
Logs a mesage 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.


Copyright 2000-2002 Apache Software Foundation. All Rights Reserved.