Browse Source

JavaDoc comments.

Note that the comments for setProject say that only Project should use this method - whereas there are *lots* of uses outside Project...


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271532 13f79535-47bb-0310-9956-ffa450edef68
master
Jon Skeet 23 years ago
parent
commit
10a699cb4c
1 changed files with 15 additions and 10 deletions
  1. +15
    -10
      src/main/org/apache/tools/ant/ProjectComponent.java

+ 15
- 10
src/main/org/apache/tools/ant/ProjectComponent.java View File

@@ -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
* 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.
*
* @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 {
}
}
}


Loading…
Cancel
Save