AntStructure (Apache Ant API)
Date: 2017-02-02

org.apache.tools.ant.taskdefs

## Class AntStructure

- java.lang.Object
- - org.apache.tools.ant.ProjectComponent
  - - org.apache.tools.ant.Task
    - - org.apache.tools.ant.taskdefs.AntStructure

- All Implemented Interfaces:
    java.lang.Cloneable

      public class AntStructure
      extends Task

  Creates a partial DTD for Ant from the currently known tasks.
  Since:
    Ant 1.1

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `AntStructure.StructurePrinter` Writes the actual structure information.

  - ### Field Summary

    - ### Fields inherited from class org.apache.tools.ant.Task

      `target, taskName, taskType, wrapper`

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

      `description, location, project`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AntStructure()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(AntStructure.StructurePrinter p)` The StructurePrinter to use.
    `protected boolean` | `areNmtokens(java.lang.String[] s)` Do the Strings all match the XML-NMTOKEN production?
    `void` | `execute()` Build the antstructure DTD.
    `protected boolean` | `isNmtoken(java.lang.String s)` Does this String match the XML-NMTOKEN production?
    `void` | `setOutput(java.io.File output)` The output file.

    - ### Methods inherited from class org.apache.tools.ant.Task

      `bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType`

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

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

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

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

- - ### Constructor Detail

    - #### AntStructure

          public AntStructure()

  - ### Method Detail

    - #### setOutput

          public void setOutput(java.io.File output)

      The output file.
      Parameters:
        `output` - the output file

    - #### add

          public void add(AntStructure.StructurePrinter p)

      The StructurePrinter to use.
      Parameters:
        `p` - the printer to use.
      Since:
        Ant 1.7

    - #### execute

          public void execute()
                       throws BuildException

      Build the antstructure DTD.
      Overrides:
        `execute` in class `Task`
      Throws:
        `BuildException` - if the DTD cannot be written.

    - #### isNmtoken

          protected boolean isNmtoken(java.lang.String s)

      Does this String match the XML-NMTOKEN production?
      Parameters:
        `s` - the string to test
      Returns:
        true if the string matches the XML-NMTOKEN

    - #### areNmtokens

          protected boolean areNmtokens(java.lang.String[] s)

      Do the Strings all match the XML-NMTOKEN production?

      Otherwise they are not suitable as an enumerated attribute, for example.

      Parameters:
        `s` - the array of string to test
      Returns:
        true if all the strings in the array math XML-NMTOKEN