Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.errai.reflections.util
Class FilterBuilder

    java.lang.Object
      org.jboss.errai.reflections.util.FilterBuilder

All Implemented Interfaces:
  com.google.common.base.Predicate<java.lang.String>

Direct Known Subclasses:
  FilterBuilder.Matcher

    public class FilterBuilder

extends java.lang.Object
implements com.google.common.base.Predicate<java.lang.String>

an include exclude filter builder

for example:

     Predicate filter1 = FilterBuilder.parse("+.*, -java.*");
     Predicate filter2 = new FilterBuilder().include(".*").exclude("java.*");

Nested Class Summary
`static class` | `FilterBuilder.Exclude`
`static class` | `FilterBuilder.Include`
`static class` | `FilterBuilder.Matcher`

Constructor Summary
`FilterBuilder()`

Method Summary
`FilterBuilder` | `add(com.google.common.base.Predicate<java.lang.String> filter)` add a Predicate to the chain of predicates
`boolean` | `apply(java.lang.String regex)`
`FilterBuilder` | `exclude(java.lang.String regex)` exclude a regular expression
`FilterBuilder` | `excludePackage(java.lang.Class<?> aClass)` exclude a package of a given class
`FilterBuilder` | `include(java.lang.String regex)` include a regular expression
`FilterBuilder` | `includePackage(java.lang.Class<?> aClass)` include a package of a given class
`static FilterBuilder` | `parse(java.lang.String includeExcludeString)` parses a string representation of include exclude filter
`static java.lang.String` | `prefix(java.lang.String qualifiedName)`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.google.common.base.Predicate
`equals`

Constructor Detail

### FilterBuilder

    public FilterBuilder()

Method Detail

### include

    public FilterBuilder include(java.lang.String regex)

  include a regular expression

### exclude

    public FilterBuilder exclude(java.lang.String regex)

  exclude a regular expression

### add

    public FilterBuilder add(com.google.common.base.Predicate<java.lang.String> filter)

  add a Predicate to the chain of predicates

### includePackage

    public FilterBuilder includePackage(java.lang.Class<?> aClass)

  include a package of a given class

### excludePackage

    public FilterBuilder excludePackage(java.lang.Class<?> aClass)

  exclude a package of a given class

### prefix

    public static java.lang.String prefix(java.lang.String qualifiedName)

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### apply

    public boolean apply(java.lang.String regex)

  Specified by:
    `apply` in interface `com.google.common.base.Predicate<java.lang.String>`

### parse

    public static FilterBuilder parse(java.lang.String includeExcludeString)

  parses a string representation of include exclude filter

  the given includeExcludeString is a comma separated list of patterns, each starts with either + or - to indicate include/exclude resp. followed by the regular expression pattern

  for example parse("-java., -javax., -sun., -com.sun.") or parse("+com.myn,-com.myn.excluded")

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011. All Rights Reserved.