org.sonar.api.batch.fs
Class FilePredicates

java.lang.Object
  extended by org.sonar.api.batch.fs.FilePredicates

public class FilePredicates
extends Object

Factory of FilePredicate

Since:
4.2

Method Summary
static FilePredicate all()
          Returns a predicate that always evaluates to true
static FilePredicate and(Collection<FilePredicate> and)
           
static FilePredicate and(FilePredicate... and)
           
static FilePredicate and(FilePredicate first, FilePredicate second)
           
static FilePredicate doesNotMatchPathPattern(String exclusionPattern)
           
static FilePredicate doesNotMatchPathPatterns(String[] exclusionPatterns)
           
static FilePredicate hasAbsolutePath(String s)
          Warning - not efficient because absolute path is not indexed yet.
static FilePredicate hasLanguage(String language)
           
static FilePredicate hasLanguages(Collection<String> languages)
           
static FilePredicate hasPath(String s)
           
static FilePredicate hasRelativePath(String s)
          TODO document that non-normalized path and Windows-style path are supported
static FilePredicate hasStatus(InputFile.Status status)
           
static FilePredicate hasType(InputFile.Type type)
           
static FilePredicate is(File ioFile)
           
static FilePredicate matchesPathPattern(String inclusionPattern)
           
static FilePredicate matchesPathPatterns(String[] inclusionPatterns)
           
static FilePredicate none()
          Returns a predicate that always evaluates to false
static FilePredicate not(FilePredicate p)
           
static FilePredicate or(Collection<FilePredicate> or)
           
static FilePredicate or(FilePredicate... or)
           
static FilePredicate or(FilePredicate first, FilePredicate second)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

all

public static FilePredicate all()
Returns a predicate that always evaluates to true


none

public static FilePredicate none()
Returns a predicate that always evaluates to false


hasAbsolutePath

public static FilePredicate hasAbsolutePath(String s)
Warning - not efficient because absolute path is not indexed yet.


hasRelativePath

public static FilePredicate hasRelativePath(String s)
TODO document that non-normalized path and Windows-style path are supported


matchesPathPattern

public static FilePredicate matchesPathPattern(String inclusionPattern)

matchesPathPatterns

public static FilePredicate matchesPathPatterns(String[] inclusionPatterns)

doesNotMatchPathPattern

public static FilePredicate doesNotMatchPathPattern(String exclusionPattern)

doesNotMatchPathPatterns

public static FilePredicate doesNotMatchPathPatterns(String[] exclusionPatterns)

hasPath

public static FilePredicate hasPath(String s)

is

public static FilePredicate is(File ioFile)

hasLanguage

public static FilePredicate hasLanguage(String language)

hasLanguages

public static FilePredicate hasLanguages(Collection<String> languages)

hasStatus

public static FilePredicate hasStatus(InputFile.Status status)

hasType

public static FilePredicate hasType(InputFile.Type type)

not

public static FilePredicate not(FilePredicate p)

or

public static FilePredicate or(Collection<FilePredicate> or)

or

public static FilePredicate or(FilePredicate... or)

or

public static FilePredicate or(FilePredicate first,
                               FilePredicate second)

and

public static FilePredicate and(Collection<FilePredicate> and)

and

public static FilePredicate and(FilePredicate... and)

and

public static FilePredicate and(FilePredicate first,
                                FilePredicate second)


Copyright © 2009-2014 SonarSource. All Rights Reserved.