hudson.plugins.pmd.util
Class FileFinder

java.lang.Object
  extended by hudson.plugins.pmd.util.FileFinder
All Implemented Interfaces:
hudson.FilePath.FileCallable<java.lang.String[]>, java.io.Serializable

public class FileFinder
extends java.lang.Object
implements hudson.FilePath.FileCallable<java.lang.String[]>

Scans the workspace and finds all Java files.

Author:
Ulli Hafner
See Also:
Serialized Form

Constructor Summary
FileFinder()
          Creates a new instance of FileFinder.
FileFinder(java.lang.String pattern)
          Creates a new instance of FileFinder.
 
Method Summary
 java.lang.String[] find(java.io.File workspace)
          Returns an array with the filenames of the specified file pattern that have been found in the workspace.
 java.lang.String[] invoke(java.io.File workspace, hudson.remoting.VirtualChannel channel)
          Returns an array with the filenames of the specified file pattern that have been found in the workspace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileFinder

public FileFinder()
Creates a new instance of FileFinder. This instance will scan for Java files, see JAVA_PATTERN.


FileFinder

public FileFinder(java.lang.String pattern)
Creates a new instance of FileFinder.

Parameters:
pattern - the ant file pattern to scan for
Method Detail

invoke

public java.lang.String[] invoke(java.io.File workspace,
                                 hudson.remoting.VirtualChannel channel)
                          throws java.io.IOException
Returns an array with the filenames of the specified file pattern that have been found in the workspace.

Specified by:
invoke in interface hudson.FilePath.FileCallable<java.lang.String[]>
Parameters:
workspace - root directory of the workspace
channel - not used
Returns:
the filenames of all found files
Throws:
java.io.IOException

find

public java.lang.String[] find(java.io.File workspace)
Returns an array with the filenames of the specified file pattern that have been found in the workspace.

Parameters:
workspace - root directory of the workspace
Returns:
the filenames of all found files


Copyright © 2008. All Rights Reserved.