|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectse.biltmore.tools.odttoapt.maven.plugin.SourcePath
public class SourcePath
Field Summary | |
---|---|
private String |
fileRegexpFilter
A regular expression filter to apply to each found file. |
private File |
path
The path under which to look for source files. |
private boolean |
recursive
If true source files will be searched for recursively, otherwise only in the direct path. |
Constructor Summary | |
---|---|
SourcePath(File path)
Creates a new instance. |
|
SourcePath(File path,
boolean recursive,
String fileRegexpFilter)
Creates a new instance. |
|
SourcePath(String pathExpression)
Creates a new instance. |
Method Summary | |
---|---|
private void |
findSourceFiles(File currentPath,
List<File> sourceFiles)
Support method to recursively find files. |
List<File> |
getSourceFiles()
|
private boolean |
isRegularExpression(String name)
Returns true if the name is a regular expression. |
void |
setFileRegexpFilter(String fileRegexpFilter)
Supply a file filter using a regular expression. |
void |
setRecursive(boolean recursive)
Sets recursive path or not. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private File path
private boolean recursive
private String fileRegexpFilter
Constructor Detail |
---|
public SourcePath(String pathExpression)
This parses a String that must be in one of the following formats:
/my/path All files in the directory pointed to by the path. /my/path/{star}{star} All files in the directory pointed to by the path and underlaying directories. /my/path/{star}{star}/{regexp pattern} All files matching the pattern in the directory pointed to by the path and udnderlaying directories. /my/path/{regexp pattern} All files matching the pattern in the directory pointed to by the path.
pathExpression
- The path expression as explained above.public SourcePath(File path)
path
- The path to supply source files for.public SourcePath(File path, boolean recursive, String fileRegexpFilter)
path
- The path to supply source files for.recursive
- If true source files will be searched for recursively down the file structure.fileRegexpFilter
- A filter to apply for each file. Example "*.java". This can be null which means no filter.Method Detail |
---|
private final boolean isRegularExpression(String name)
name
- The name to check.public void setRecursive(boolean recursive)
recursive
- If true source files will be searched for recursively down the file structure.public void setFileRegexpFilter(String fileRegexpFilter)
fileRegexpFilter
- A filter to apply for each file. Example "*.java". This can be null which means no filter.public List<File> getSourceFiles()
private void findSourceFiles(File currentPath, List<File> sourceFiles)
currentPath
- The path to start finding files in.sourceFiles
- Found files are added to this list.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |