Package org.zeroturnaround.javarebel
Interface RebelSource
public interface RebelSource
Abstraction of a
dir or a jar element
defined in a rebel.xml.- Author:
- Rein Raudjärv
-
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptPath(String path) Returns all paths of this source (using pattern matching if enabled).getDir()getFile()getSubPaths(String parent) Returns a listing of all direct sub-paths beginning with the given prefix.booleanbooleanisDir()booleanisJar()
-
Method Details
-
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
- Parameters:
path- the path to check- Returns:
trueif this source may contain specified path i.e. path matches the pattern used by this source.
-
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
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).
-