java.lang.Cloneable
AbstractScriptComponent
, BaseIfAttribute
, Commandline.Argument
, Concat.TextElement
, ConditionBase
, DataType
, FailureRecorder
, FileTokenizer
, HasMethod
, Http
, IsFalse
, IsLastModified
, IsReachable
, IsReference
, IsSet
, IsTrue
, Javadoc.ExtensionInfo
, LineTokenizer
, Matches
, Message
, ParserSupports
, Provider
, ResourceExists
, Service
, Socket
, StringTokenizer
, Task
, TokenFilter.ChainableReaderFilter
, TokenFilter.ContainsString
, TokenFilter.DeleteCharacters
, TypeFound
, XMLFragment
, XSLTProcess.Factory.Attribute
public abstract class ProjectComponent
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field | Description |
---|---|---|
protected java.lang.String |
description |
Deprecated.
since 1.6.x.
|
protected Location |
location |
Deprecated.
since 1.6.x.
|
protected Project |
project |
Deprecated.
since 1.6.x.
|
Constructor | Description |
---|---|
ProjectComponent() |
Sole constructor.
|
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object |
clone() |
|
java.lang.String |
getDescription() |
Returns the description of the current action.
|
Location |
getLocation() |
Returns the file/location where this task was defined.
|
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 message with the given priority.
|
void |
setDescription(java.lang.String desc) |
Sets a description of the current action.
|
void |
setLocation(Location location) |
Sets the file/location where this task was defined.
|
void |
setProject(Project project) |
Sets the project object of this component.
|
@Deprecated protected Project project
@Deprecated protected Location location
getLocation()
method.@Deprecated protected java.lang.String description
public void setProject(Project project)
project
- Project in whose scope this component belongs.
Must not be null
.public Project getProject()
public Location getLocation()
null
. Location.UNKNOWN_LOCATION
is used for unknown locations.Location.UNKNOWN_LOCATION
public void setLocation(Location location)
location
- The file/location where this task was defined.
Should not be null
--use
Location.UNKNOWN_LOCATION if the location isn't known.Location.UNKNOWN_LOCATION
public void setDescription(java.lang.String desc)
desc
- Description of the current action.
May be null
, indicating that no description is
available.public java.lang.String getDescription()
null
if
no description is available.public void log(java.lang.String msg)
msg
- The message to be logged. Should not be null
.public void log(java.lang.String msg, int msgLevel)
msg
- The message to be logged. Should not be null
.msgLevel
- the message priority at which this message is
to be logged.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- does not happen,
but is declared to allow subclasses to do so.