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

Package org.apache.tools.ant.taskdefs

# Class MacroDef.TemplateElement

java.lang.Object
org.apache.tools.ant.taskdefs.MacroDef.TemplateElement

Enclosing class:
  `MacroDef`

public static class MacroDef.TemplateElement extends Object
A nested element for the MacroDef task.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TemplateElement()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  equality method.
  `String`
  `getDescription()`
  Gets the description of this element.
  `String`
  `getName()`
  Gets the name of this element.
  `int`
  `hashCode()`
  `boolean`
  `isImplicit()`
  Gets whether this element is implicit.
  `boolean`
  `isOptional()`
  Gets whether this element is optional.
  `void`
  `setDescription(String desc)`
  Sets a textual description of this element, for build documentation purposes only.
  `void`
  `setImplicit(boolean implicit)`
  Sets whether this element is implicit.
  `void`
  `setName(String name)`
  Sets the name of this element.
  `void`
  `setOptional(boolean optional)`
  Sets whether this element is optional.

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

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TemplateElement

    public TemplateElement()

- ## Method Details

  - ### setName

    public void setName(String name)
    Sets the name of this element.
    Parameters:
      `name` - the name of the element

  - ### getName

    public String getName()
    Gets the name of this element.
    Returns:
      the name of the element.

  - ### setDescription

    public void setDescription(String desc)
    Sets a textual description of this element, for build documentation purposes only.
    Parameters:
      `desc` - Description of the element.
    Since:
      ant 1.6.1

  - ### getDescription

    public String getDescription()
    Gets the description of this element.
    Returns:
      the description of the element, or `null` if no description is available.
    Since:
      ant 1.6.1

  - ### setOptional

    public void setOptional(boolean optional)
    Sets whether this element is optional.
    Parameters:
      `optional` - if true this element may be left out, default is false.

  - ### isOptional

    public boolean isOptional()
    Gets whether this element is optional.
    Returns:
      the optional attribute

  - ### setImplicit

    public void setImplicit(boolean implicit)
    Sets whether this element is implicit.
    Parameters:
      `implicit` - if true this element may be left out, default is false.

  - ### isImplicit

    public boolean isImplicit()
    Gets whether this element is implicit.
    Returns:
      the implicit attribute

  - ### equals

    public boolean equals(Object obj)
    equality method.
    Overrides:
      `equals` in class `Object`
    Parameters:
      `obj` - an `Object` value
    Returns:
      a `boolean` value

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`
    Returns:
      a hash code value for this object.