Class Case

  • All Implemented Interfaces:
    Breakable, java.lang.Cloneable, org.apache.tools.ant.TaskContainer
    Direct Known Subclasses:
    DefaultCase

    public class Case
    extends org.apache.tools.ant.Task
    implements org.apache.tools.ant.TaskContainer, Breakable
    This TaskContainer is intended to be nested into the Switch task.
    Version:
    $Revision: 111 $
    • 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 Description
      Case()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addBreak​(Break b)
      Required for Breakable interface.
      void addTask​(org.apache.tools.ant.Task task)
      Adds a feature to the Task attribute of the Case object
      boolean doBreak()
      Required for Breakable interface.
      void execute()
      Execute all nested tasks, checking for Breakables.
      java.lang.String getValue()  
      void setBreak​(boolean b)
      Required for Breakable interface.
      void setValue​(java.lang.String value)
      Set the value for this case.
      • 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

      • Case

        public Case()
    • Method Detail

      • setValue

        public void setValue​(java.lang.String value)
        Set the value for this case. This value is used by the Switch task to decide if this task should execute.
        Parameters:
        value - the value.
      • getValue

        public java.lang.String getValue()
        Returns:
        the value for this case.
      • setBreak

        public void setBreak​(boolean b)
        Required for Breakable interface.
        Specified by:
        setBreak in interface Breakable
        Parameters:
        b - The new break value
        See Also:
        Breakable
      • doBreak

        public boolean doBreak()
        Required for Breakable interface.
        Specified by:
        doBreak in interface Breakable
        Returns:
        Description of the Returned Value
        See Also:
        Breakable
      • addBreak

        public void addBreak​(Break b)
        Required for Breakable interface.
        Specified by:
        addBreak in interface Breakable
        Parameters:
        b - The feature to be added to the Break attribute
        See Also:
        Breakable
      • addTask

        public void addTask​(org.apache.tools.ant.Task task)
                     throws org.apache.tools.ant.BuildException
        Adds a feature to the Task attribute of the Case object
        Specified by:
        addTask in interface org.apache.tools.ant.TaskContainer
        Parameters:
        task - The feature to be added to the Task attribute
        Throws:
        org.apache.tools.ant.BuildException - Description of Exception
      • execute

        public void execute()
                     throws org.apache.tools.ant.BuildException
        Execute all nested tasks, checking for Breakables.
        Overrides:
        execute in class org.apache.tools.ant.Task
        Throws:
        org.apache.tools.ant.BuildException - Description of Exception