Description (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.types, class: Description

Package org.apache.tools.ant.types

# Class Description

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.Description

All Implemented Interfaces:
  `Cloneable`

public class Description extends DataType
Description is used to provide a project-wide description element (that is, a description that applies to a buildfile as a whole). If present, the <description> element is printed out before the target descriptions. Description has no attributes, only text. There can only be one project description per project. A second description element will overwrite the first.

- ## Field Summary

  ### Fields inherited from class org.apache.tools.ant.types.DataType

  `checked, ref`

  ### Fields inherited from class org.apache.tools.ant.ProjectComponent

  `description, location, project`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Description()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addText(String text)`
  Adds descriptive text to the project.
  `static String`
  `getDescription(Project project)`
  Return the descriptions from all the targets of a project.

  ### Methods inherited from class org.apache.tools.ant.types.DataType

  `checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, setRefid, tooManyAttributes, toString`

  ### Methods inherited from class org.apache.tools.ant.ProjectComponent

  `getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Description

    public Description()

- ## Method Details

  - ### addText

    public void addText(String text)
    Adds descriptive text to the project.
    Parameters:
      `text` - the descriptive text

  - ### getDescription

    public static String getDescription(Project project)
    Return the descriptions from all the targets of a project.
    Parameters:
      `project` - the project to get the descriptions for.
    Returns:
      a string containing the concatenated descriptions of the targets.