Package org.zeroturnaround.javarebel
Interface RebelSource
-
public interface RebelSourceAbstraction of adiror ajarelement defined in arebel.xml.- Author:
- Rein Raudjärv
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanacceptPath(String path)Set<String>getAllPaths()Returns all paths of this source (using pattern matching if enabled).FilegetDir()FilegetFile()Set<String>getSubPaths(String parent)Returns a listing of all direct sub-paths beginning with the given prefix.booleanhasPatterns()booleanisDir()booleanisJar()
-
-
-
Method Detail
-
isDir
boolean isDir()
- Returns:
trueif this is a directory source.
-
isJar
boolean isJar()
- Returns:
trueif this is a JAR source.
-
getFile
File getFile()
- Returns:
- the directory or JAR of this source. In case of a JAR this is the JAR file.
-
getDir
File getDir()
- Returns:
- the directory of this source. In case of a JAR this is the location where the resources are unpacked to.
-
hasPatterns
boolean hasPatterns()
- Returns:
trueif this source uses pattern matching.
-
acceptPath
boolean acceptPath(String path)
- Returns:
trueif this source may contain specified path i.e. path matches the pattern used by this source.
-
getAllPaths
Set<String> getAllPaths()
Returns all paths of this source (using pattern matching if enabled).All paths are relative to this source. Only
/is used as a directory separator. All directory paths end with a/character. No leading characters are used.- Returns:
- Set<String> all paths of this source.
-
getSubPaths
Set<String> getSubPaths(String parent)
Returns a listing of all direct sub-paths beginning with the given prefix.The returned set contains both directories (ending with '/') and files.
- Parameters:
parent- parent path (prefix for all sub-paths).- Returns:
- direct sub-paths prefixed by the parent path or
empty set if no sub-paths found (not
null).
-
-