Class PatternsFilter.Builder

java.lang.Object
com.ibm.wala.util.config.PatternsFilter.Builder
Enclosing class:
PatternsFilter

public static class PatternsFilter.Builder extends Object
Helper for collecting regular expressions to form a PatternsFilter.
  • Method Details

    • add

      public PatternsFilter.Builder add(@Language("RegExp") String regexp)
      Adds the given regular expression to the collection to be used for an eventual PatternsFilter.
      Parameters:
      regexp - the regular expression to addAll
      Returns:
      this, to allow method chaining
    • addAll

      public PatternsFilter.Builder addAll(InputStream input)
      Adds the given regular expressions to the collection to be used for an eventual PatternsFilter.

      Any line that starts with "#" is discarded as a comment.

      Parameters:
      input - the regular expressions to addAll, one per line
      Returns:
      this, to allow method chaining
    • build

      public PatternsFilter build()
      Creates a PatternsFilter with the accumulated regular expressions.
      Returns:
      a new PatternsFilter instance