org.apache.tools.ant.taskdefs

## Class MacroDef.Text

- java.lang.Object
- - org.apache.tools.ant.taskdefs.MacroDef.Text

Enclosing class:
  MacroDef

    public static class MacroDef.Text
    extends java.lang.Object

A nested text element for the MacroDef task.

Since:
  ant 1.6.1

### Constructor Summary

Constructors
Constructor and Description
`MacroDef.Text()`

### Method Summary

Methods
`boolean` `equals(java.lang.Object obj)` equality method
`java.lang.String` `getDefault()`
`java.lang.String` `getDescription()`
`java.lang.String` `getName()`
`boolean` `getOptional()`
`boolean` `getTrim()`
`int` `hashCode()`
`void` `setDefault(java.lang.String defaultString)`
`void` `setDescription(java.lang.String desc)`
`void` `setName(java.lang.String name)` The name of the attribute.
`void` `setOptional(boolean optional)` The optional attribute of the text element.
`void` `setTrim(boolean trim)` The trim attribute of the text element.

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

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

### Constructor Detail

#### MacroDef.Text

    public MacroDef.Text()

### Method Detail

#### setName

    public void setName(java.lang.String name)

The name of the attribute.

Parameters:
  `name` - the name of the attribute

#### getName

    public java.lang.String getName()

Returns:
  the name of the attribute

#### setOptional

    public void setOptional(boolean optional)

The optional attribute of the text element.

Parameters:
  `optional` - if true this is optional

#### getOptional

    public boolean getOptional()

Returns:
  true if the text is optional

#### setTrim

    public void setTrim(boolean trim)

The trim attribute of the text element.

Parameters:
  `trim` - if true this String.trim() is called on the contents of the text element.

#### getTrim

    public boolean getTrim()

Returns:
  true if the text is trim

#### setDescription

    public void setDescription(java.lang.String desc)

Parameters:
  `desc` - Description of the text.

#### getDescription

    public java.lang.String getDescription()

Returns:
  the description of the text, or `null` if no description is available.

#### setDefault

    public void setDefault(java.lang.String defaultString)

Parameters:
  `defaultString` - default text for the string.

#### getDefault

    public java.lang.String getDefault()

Returns:
  the default text if set, null otherwise.

#### equals

    public boolean equals(java.lang.Object obj)

equality method

Overrides:
  `equals` in class `java.lang.Object`
Parameters:
  `obj` - an `Object` value
Returns:
  a `boolean` value

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`
Returns:
  a hash code value for this object.