org.argouml.uml.reveng
Class FileImportUtils

java.lang.Object
  extended by org.argouml.uml.reveng.FileImportUtils

public class FileImportUtils
extends java.lang.Object

Utility methods for source file importers.


Constructor Summary
FileImportUtils()
           
 
Method Summary
static java.util.List<java.io.File> getList(java.io.File file, boolean recurse, org.argouml.util.SuffixFilter[] filters)
          Deprecated. for 0.25.4 by tfmorris. Use getList(File, boolean, SuffixFilter[], ProgressMonitor).
static java.util.List<java.io.File> getList(java.io.File file, boolean recurse, org.argouml.util.SuffixFilter[] filters, org.argouml.taskmgmt.ProgressMonitor monitor)
          This method returns a List of source files to import.
static boolean matchesSuffix(java.lang.Object file, org.argouml.util.SuffixFilter[] filters)
          Tells if the filename matches one of the given suffixes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileImportUtils

public FileImportUtils()
Method Detail

getList

@Deprecated
public static java.util.List<java.io.File> getList(java.io.File file,
                                                              boolean recurse,
                                                              org.argouml.util.SuffixFilter[] filters)
Deprecated. for 0.25.4 by tfmorris. Use getList(File, boolean, SuffixFilter[], ProgressMonitor).

Return a List of source files to import.

Processing each file in turn is equivalent to a breadth first search through the directory structure.

Parameters:
file - file or directory to import
recurse - if true, descend directory tree recursively
filters - array of file suffixes to match for filtering
Returns:
a list of files to be imported

getList

public static java.util.List<java.io.File> getList(java.io.File file,
                                                   boolean recurse,
                                                   org.argouml.util.SuffixFilter[] filters,
                                                   org.argouml.taskmgmt.ProgressMonitor monitor)
This method returns a List of source files to import.

Processing each file in turn is equivalent to a breadth first search through the directory structure.

Parameters:
file - file or directory to import
recurse - if true, descend directory tree recursively
filters - array of file suffixes to match for filtering
monitor - a progress monitor which will be monitored for cancellation requests. (Progress updates are not provided since the amount of time required to get the files is non-deterministic).
Returns:
a list of files to be imported

matchesSuffix

public static boolean matchesSuffix(java.lang.Object file,
                                    org.argouml.util.SuffixFilter[] filters)
Tells if the filename matches one of the given suffixes.

Parameters:
file - file to be tested.
filters - array of filters to test against.
Returns:
true if parseable, false if not.


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Cookbook