Class PatternsFilter
java.lang.Object
com.ibm.wala.util.config.PatternsFilter
- All Implemented Interfaces:
StringFilter, Serializable, Predicate<String>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHelper for collecting regular expressions to form aPatternsFilter. -
Constructor Summary
ConstructorsConstructorDescriptionPatternsFilter(File file) Creates aPatternsFilterwith the given regular expressions, one per line in the given file.PatternsFilter(InputStream input) Creates aPatternsFilterwith the given regular expressions, one per line.PatternsFilter(Path path) Creates aPatternsFilterwith the given regular expressions, one per line in the named file.PatternsFilter(Stream<String> lines) Creates aPatternsFilterwith the given regular expressions, one perStreamelement. -
Method Summary
-
Constructor Details
-
PatternsFilter
Creates aPatternsFilterwith the given regular expressions, one perStreamelement.Any element that starts with
"#"is discarded as a comment.This method does not take ownership of the given
Stream. If that argument needs to be closed after use, then the caller is responsible for doing so.- Parameters:
lines- the regular expressions to addAll, one per line
-
PatternsFilter
Creates aPatternsFilterwith the given regular expressions, one per line.Any line that starts with
"#"is discarded as a comment.This method does not take ownership of the given
InputStream. If that argument needs to be closed after use, then the caller is responsible for doing so.- Parameters:
input- the regular expressions to addAll, one per line
-
PatternsFilter
Creates aPatternsFilterwith the given regular expressions, one per line in the named file.Any line that starts with
"#"is discarded as a comment.- Parameters:
path- the path to a file containing regular expressions to addAll, one per line- Throws:
IOException
-
PatternsFilter
Creates aPatternsFilterwith the given regular expressions, one per line in the given file.Any line that starts with
"#"is discarded as a comment.- Parameters:
file- a file containing regular expressions to addAll, one per line- Throws:
IOException
-
-
Method Details
-
builder
Prepares to build aPatternsFilter.- Returns:
- a
PatternsFilter.Builderthat can collect regular expressions and create a newSetOfClassPatterns
-
test
-
toJson
Description copied from interface:StringFilterProvides a JSON-compatible representation of this filter for use in serialization.JSON-compatible types include
String,Listof a JSON-compatible type,MapfromStringto a JSON-compatible type, etc..- Specified by:
toJsonin interfaceStringFilter- Returns:
- a JSON-compatible representation of this filter
-