|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jbehave.core.io.StoryFinder
public class StoryFinder
Finds stories by scanning source paths, which can be either filesystem directories or jars. Jars are identified by paths ending in ".jar". Stories can be either in the form of class names or story paths. Stories can be sorted by providing a sorting comparator.
| Constructor Summary | |
|---|---|
StoryFinder()
|
|
StoryFinder(Comparator<? super String> sortingComparator)
|
|
StoryFinder(String classNameExtension)
|
|
| Method Summary | |
|---|---|
protected String |
classNameExtension()
|
protected List<String> |
classNames(List<String> paths)
|
List<String> |
findClassNames(String searchIn,
List<String> includes,
List<String> excludes)
Finds Java classes from a source path, allowing for includes/excludes, and converts them to class names. |
List<String> |
findPaths(String searchIn,
List<String> includes,
List<String> excludes)
Finds paths from a source path, allowing for includes/excludes. |
List<String> |
findPaths(String searchIn,
List<String> includes,
List<String> excludes,
String prefixWith)
Finds paths from a source path, allowing for includes/excludes. |
List<String> |
findPaths(String searchIn,
String include,
String exclude)
Finds paths from a source path, allowing for single include/exclude pattern. |
List<String> |
findPaths(URL searchIn,
List<String> includes,
List<String> excludes)
Finds paths from a source URL, allowing for includes/excludes, pattern. |
List<String> |
findPaths(URL searchIn,
String include,
String exclude)
Finds paths from a source URL, allowing for single include/exclude pattern. |
protected List<String> |
normalise(List<String> paths)
|
protected List<String> |
prefix(String prefixWith,
List<String> paths)
|
protected List<String> |
scan(String source,
List<String> includes,
List<String> excludes)
|
protected List<String> |
scanJar(String jarPath,
List<String> includes,
List<String> excludes)
|
protected List<String> |
sort(List<String> input)
|
protected Comparator<? super String> |
sortingComparator()
Comparator used for sorting. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StoryFinder()
public StoryFinder(String classNameExtension)
public StoryFinder(Comparator<? super String> sortingComparator)
| Method Detail |
|---|
public List<String> findClassNames(String searchIn,
List<String> includes,
List<String> excludes)
searchIn - the path to search inincludes - the List of include patterns, or null if
noneexcludes - the List of exclude patterns, or null if
none
public List<String> findPaths(URL searchIn,
String include,
String exclude)
StoryFinder#normalise(List)
searchIn - the source URL to search ininclude - the include pattern, or "" if noneexclude - the exclude pattern, or "" if none
public List<String> findPaths(URL searchIn,
List<String> includes,
List<String> excludes)
StoryFinder#normalise(List)
searchIn - the source URL to search inincludes - the List of include patterns, or null if
noneexcludes - the List of exclude patterns, or null if
none
public List<String> findPaths(String searchIn,
String include,
String exclude)
StoryFinder#normalise(List)
searchIn - the source path to search ininclude - the include pattern, or "" if noneexclude - the exclude pattern, or "" if none
public List<String> findPaths(String searchIn,
List<String> includes,
List<String> excludes)
StoryFinder#normalise(List) .
searchIn - the source path to search inincludes - the List of include patterns, or null if
noneexcludes - the List of exclude patterns, or null if
none
public List<String> findPaths(String searchIn,
List<String> includes,
List<String> excludes,
String prefixWith)
StoryFinder#prefix(String, List) and normalised by StoryFinder#normalise(List) .
searchIn - the source path to search inincludes - the List of include patterns, or null if
noneexcludes - the List of exclude patterns, or null if
noneprefixWith - the root path prefixed to all paths found, or
null if none
protected List<String> normalise(List<String> paths)
protected List<String> prefix(String prefixWith,
List<String> paths)
protected List<String> classNames(List<String> paths)
protected String classNameExtension()
protected List<String> sort(List<String> input)
protected Comparator<? super String> sortingComparator()
null comparator means that
Collections#sort() will use natural ordering.
null for natural ordering.
protected List<String> scan(String source,
List<String> includes,
List<String> excludes)
protected List<String> scanJar(String jarPath,
List<String> includes,
List<String> excludes)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||