com.sun.tdk.specdiff.ant

## Class AbstractTask

- java.lang.Object
- - org.apache.tools.ant.ProjectComponent
  - - org.apache.tools.ant.Task
    - - org.apache.tools.ant.taskdefs.MatchingTask
      - - com.sun.tdk.specdiff.ant.AbstractTask

- All Implemented Interfaces:
    java.lang.Cloneable, org.apache.tools.ant.types.selectors.SelectorContainer
  Direct Known Subclasses:
    Main

      public abstract class AbstractTask
      extends org.apache.tools.ant.taskdefs.MatchingTask

  Base class for Specdiff Ant tasks

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `OVERVIEW_NAME_PARAM`
    `static java.lang.String` | `PACKAGE_NAME_PARAM`

    - ### Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask

      `fileset`

    - ### 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
    `AbstractTask()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `checkParameters()` Check that all required attributes have been set and nothing silly has been entered.
    `org.apache.tools.ant.types.Parameter` | `createParam()`
    `boolean` | `detectPackageMode(java.util.List<java.lang.String> fileList)` Detects if package mode is needed or not.
    `java.io.File` | `fixFileName(java.io.File f)` Remove leading/trailing spaces in the file name.
    `Configuration` | `getConfiguration()`
    `protected ConfigurationManager` | `getConfigurationManager()` Returns configuration manager used in this task.
    `java.lang.String` | `getType()`
    `boolean` | `isOverviewSupported()`
    `boolean` | `isPackage(java.io.File f)`
    `boolean` | `isPackage(java.lang.String fileName)`
    `boolean` | `isPackagesSupported()`
    `protected void` | `logError(java.lang.String msg)` Convenience method for logging errors.
    `void` | `setType(java.lang.String type)`

    - ### Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask

      `add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems`

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

      `bindToOwner, execute, 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`

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

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

- - ### Field Detail

    - #### OVERVIEW_NAME_PARAM

          public static final java.lang.String OVERVIEW_NAME_PARAM

      See Also:
        Constant Field Values

    - #### PACKAGE_NAME_PARAM

          public static final java.lang.String PACKAGE_NAME_PARAM

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AbstractTask

          public AbstractTask()

  - ### Method Detail

    - #### createParam

          public org.apache.tools.ant.types.Parameter createParam()

    - #### getType

          public final java.lang.String getType()

    - #### setType

          public final void setType(java.lang.String type)

    - #### getConfiguration

          public final Configuration getConfiguration()

    - #### isOverviewSupported

          public final boolean isOverviewSupported()

    - #### isPackagesSupported

          public final boolean isPackagesSupported()

    - #### isPackage

          public final boolean isPackage(java.io.File f)

    - #### isPackage

          public final boolean isPackage(java.lang.String fileName)

    - #### detectPackageMode

          public final boolean detectPackageMode(java.util.List<java.lang.String> fileList)

      Detects if package mode is needed or not. Package mode is needed when packages are supported and there is at least one package file among given files
      Parameters:
        `fileList` - - list of files
      Returns:
        true, if isPackagesSupported() and fileList contains at least one package file (package-summary).

    - #### checkParameters

          protected void checkParameters()

      Check that all required attributes have been set and nothing silly has been entered.

    - #### fixFileName

          public java.io.File fixFileName(java.io.File f)

      Remove leading/trailing spaces in the file name.
      Parameters:
        `f` - file name to fix
      Returns:
        the same file, but without leading/trailing spaces

    - #### getConfigurationManager

          protected ConfigurationManager getConfigurationManager()

      Returns configuration manager used in this task. This method should be overridden in order to use another configuration manager singleton.

    - #### logError

          protected final void logError(java.lang.String msg)

      Convenience method for logging errors.