## org.apache.tools.ant.taskdefs.optional.dotnet
Class DotnetBaseMatchingTask

    java.lang.Object
      |
      +--org.apache.tools.ant.ProjectComponent
            |
            +--org.apache.tools.ant.Task
                  |
                  +--org.apache.tools.ant.taskdefs.MatchingTask
                        |
                        +--org.apache.tools.ant.taskdefs.optional.dotnet.DotnetBaseMatchingTask

All Implemented Interfaces:
  SelectorContainer

Direct Known Subclasses:
  DotnetCompile, Ilasm

public class DotnetBaseMatchingTask
extends MatchingTask

refactoring of some stuff so that different things (like ILASM) can use shared code.

Author:
  steve loughran

Field Summary
`protected java.util.Vector` `filesets` filesets of file to compile
`protected java.io.File` `outputFile` output file.
`protected java.io.File` `srcDir` source directory upon which the search pattern is applied

Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
`fileset`

Fields inherited from class org.apache.tools.ant.Task
`description, location, target, taskName, taskType, wrapper`

Fields inherited from class org.apache.tools.ant.ProjectComponent
`project`

Constructor Summary
`DotnetBaseMatchingTask()`

Method Summary
`protected void` `addFilesAndExecute(NetCommand command, boolean ignoreTimestamps)` finish off the command by adding all dependent files, execute
`protected void` `addFilesToCommand(java.util.Hashtable filesToBuild, NetCommand command)` add the list of files to a command
`void` `addSrc(FileSet src)` add a new source directory to the compile
`protected int` `buildFileList(NetCommand command, java.util.Hashtable filesToBuild, long outputTimestamp)` create the list of files
`java.io.File` `getDestFile()` get the destination file
`protected long` `getOutputFileTimestamp()` determine the timestamp of the output file
`java.io.File` `getSrcDir()` Overridden because we need to be able to set the srcDir.
`void` `setDestFile(java.io.File file)` Set the name of exe/library to create.
`void` `setSrcDir(java.io.File srcDirName)` Set the source directory of the files to be compiled.

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
`execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType`

Methods inherited from class org.apache.tools.ant.ProjectComponent
`getProject`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### outputFile

    protected java.io.File outputFile

  output file. If not supplied this is derived from the source file

### filesets

    protected java.util.Vector filesets

  filesets of file to compile

### srcDir

    protected java.io.File srcDir

  source directory upon which the search pattern is applied

Constructor Detail

### DotnetBaseMatchingTask

    public DotnetBaseMatchingTask()

Method Detail

### getSrcDir

    public java.io.File getSrcDir()

  Overridden because we need to be able to set the srcDir.

### setSrcDir

    public void setSrcDir(java.io.File srcDirName)

  Set the source directory of the files to be compiled.

  Parameters:
    `srcDirName` - The new SrcDir value

### setDestFile

    public void setDestFile(java.io.File file)

  Set the name of exe/library to create.

  Parameters:
    `file` - The new outputFile value

### addSrc

    public void addSrc(FileSet src)

  add a new source directory to the compile

  Parameters:
    `src` -

### getDestFile

    public java.io.File getDestFile()

  get the destination file

  Returns:
    the dest file or null for not assigned

### buildFileList

    protected int buildFileList(NetCommand command,
                                java.util.Hashtable filesToBuild,
                                long outputTimestamp)

  create the list of files

  Parameters:
    `filesToBuild` - vector to add files to
    `outputTimestamp` - timestamp to compare against
  Returns:
    number of files out of date

### addFilesToCommand

    protected void addFilesToCommand(java.util.Hashtable filesToBuild,
                                     NetCommand command)

  add the list of files to a command

  Parameters:
    `filesToBuild` - vector of files
    `command` - the command to append to

### getOutputFileTimestamp

    protected long getOutputFileTimestamp()

  determine the timestamp of the output file

  Returns:
    a timestamp or 0 for no output file known/exists

### addFilesAndExecute

    protected void addFilesAndExecute(NetCommand command,
                                      boolean ignoreTimestamps)

  finish off the command by adding all dependent files, execute

  Parameters:
    `command` -

Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.