Class PreSetDef

All Implemented Interfaces:
Cloneable, TaskContainer

public class PreSetDef extends AntlibDefinition implements TaskContainer
The preset definition task generates a new definition based on a current definition with some attributes or elements preset.
 <presetdef name="my.javac">
   <javac deprecation="${deprecation}" debug="${debug}"/>
 </presetdef>
 <my.javac srcdir="src" destdir="classes"/>
 
Since:
Ant 1.6
  • Constructor Details

    • PreSetDef

      public PreSetDef()
  • Method Details

    • setName

      public void setName(String name)
      Set the name of this definition.
      Parameters:
      name - the name of the definition.
    • addTask

      public void addTask(Task nestedTask)
      Add a nested task to predefine attributes and elements on.
      Specified by:
      addTask in interface TaskContainer
      Parameters:
      nestedTask - Nested task/type to extend.
    • execute

      public void execute()
      Make a new definition.
      Overrides:
      execute in class Task