Class RelativePathPredicate
java.lang.Object
org.sonar.api.batch.fs.internal.predicates.AbstractFilePredicate
org.sonar.api.batch.fs.internal.predicates.RelativePathPredicate
- All Implemented Interfaces:
Comparable<OptimizedFilePredicate>
,org.sonar.api.batch.fs.FilePredicate
,OptimizedFilePredicate
- Since:
- 4.2
-
Field Summary
Fields inherited from class org.sonar.api.batch.fs.internal.predicates.AbstractFilePredicate
DEFAULT_PRIORITY, USE_INDEX
-
Method Summary
Methods inherited from class org.sonar.api.batch.fs.internal.predicates.AbstractFilePredicate
compareTo, filter
-
Method Details
-
path
-
apply
public boolean apply(org.sonar.api.batch.fs.InputFile f) -
get
public Iterable<org.sonar.api.batch.fs.InputFile> get(org.sonar.api.batch.fs.FileSystem.Index index) Description copied from interface:OptimizedFilePredicate
Get all files that are valid for this predicate.- Specified by:
get
in interfaceOptimizedFilePredicate
- Overrides:
get
in classAbstractFilePredicate
-
priority
public int priority()Description copied from interface:OptimizedFilePredicate
For optimization. FilePredicates will be applied in priority order. For example when doing p.and(p1, p2, p3) then p1, p2 and p3 will be applied according to their priority value. Higher priority value are applied first. Assign a high priority when the predicate will likely highly reduce the set of InputFiles to filter. AlsoRelativePathPredicate
and AbsolutePathPredicate have a high priority since they are using cache index.- Specified by:
priority
in interfaceOptimizedFilePredicate
- Overrides:
priority
in classAbstractFilePredicate
-