Package org.jboss.shrinkwrap.api
Class Filters
- java.lang.Object
-
- org.jboss.shrinkwrap.api.Filters
-
public final class Filters extends java.lang.Object
Factory class for the creation of newFilter
instances. Filter instances using this shorthand class will be created using theClassLoader
associated with the defaultDomain
'sConfiguration
.- Version:
- $Revision: $
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
IMPL_CLASS_NAME_EXCLUDE_PATHS
private static java.lang.String
IMPL_CLASS_NAME_EXCLUDE_REGEXP_PATHS
private static java.lang.String
IMPL_CLASS_NAME_INCLUDE_ALL_PATHS
private static java.lang.String
IMPL_CLASS_NAME_INCLUDE_PATHS
private static java.lang.String
IMPL_CLASS_NAME_INCLUDE_REGEXP_PATHS
-
Constructor Summary
Constructors Modifier Constructor Description private
Filters()
No instantiation
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static Filter<ArchivePath>
createRegExpFilter(java.lang.String regExpFilterImplName, java.lang.Class<?>... classes)
private static Filter<ArchivePath>
createRegExpFilter(java.lang.String filterClassName, java.lang.Package... packages)
static Filter<ArchivePath>
exclude(java.lang.Class<?>... classes)
Filter
that excludes listedClass
.static Filter<ArchivePath>
exclude(java.lang.Package... packages)
Filter
that includes listedPackage
.static Filter<ArchivePath>
exclude(java.lang.String regexp)
static Filter<ArchivePath>
excludePaths(java.lang.String... paths)
Filter
that exclude allArchivePath
s that match the given List of paths.static Filter<ArchivePath>
excludePaths(java.util.Collection<java.lang.String> paths)
Filter
that exclude allArchivePath
s that match the given List of paths.private static Filter<ArchivePath>
getFilterInstance(java.lang.String filterClassName, java.lang.Class<?>[] ctorTypes, java.lang.Object[] ctorArguments)
Creates a newFilter
instance using the given impl class name, constructor arguments and typestatic Filter<ArchivePath>
include(java.lang.Class<?>... classes)
Filter
that includes listedClass
.static Filter<ArchivePath>
include(java.lang.Package... packages)
Filter
that excludes listedPackage
.static Filter<ArchivePath>
include(java.lang.String regexp)
static Filter<ArchivePath>
includeAll()
Filter
that includes allArchivePath
s.static Filter<ArchivePath>
includePaths(java.lang.String... paths)
Filer
that include allArchivePath
s that match the given List of paths..static Filter<ArchivePath>
includePaths(java.util.Collection<java.lang.String> paths)
Filer
that include allArchivePath
s that match the given List of paths..
-
-
-
Field Detail
-
IMPL_CLASS_NAME_INCLUDE_ALL_PATHS
private static final java.lang.String IMPL_CLASS_NAME_INCLUDE_ALL_PATHS
- See Also:
- Constant Field Values
-
IMPL_CLASS_NAME_INCLUDE_REGEXP_PATHS
private static final java.lang.String IMPL_CLASS_NAME_INCLUDE_REGEXP_PATHS
- See Also:
- Constant Field Values
-
IMPL_CLASS_NAME_EXCLUDE_REGEXP_PATHS
private static final java.lang.String IMPL_CLASS_NAME_EXCLUDE_REGEXP_PATHS
- See Also:
- Constant Field Values
-
IMPL_CLASS_NAME_INCLUDE_PATHS
private static final java.lang.String IMPL_CLASS_NAME_INCLUDE_PATHS
- See Also:
- Constant Field Values
-
IMPL_CLASS_NAME_EXCLUDE_PATHS
private static final java.lang.String IMPL_CLASS_NAME_EXCLUDE_PATHS
- See Also:
- Constant Field Values
-
-
Method Detail
-
includeAll
public static Filter<ArchivePath> includeAll()
Filter
that includes allArchivePath
s. Only meant to be used internally.- Returns:
- A
Filter
that always return true
-
include
public static Filter<ArchivePath> include(java.lang.String regexp)
- Parameters:
regexp
- The expression to include- Returns:
- A Regular Expression based include
Filter
-
exclude
public static Filter<ArchivePath> exclude(java.lang.String regexp)
- Parameters:
regexp
- The expression to exclude- Returns:
- A Regular Expression based exclude
Filter
-
includePaths
public static Filter<ArchivePath> includePaths(java.lang.String... paths)
Filer
that include allArchivePath
s that match the given List of paths..- Parameters:
paths
- The paths to included- Returns:
- A Path list based include
Filter
-
includePaths
public static Filter<ArchivePath> includePaths(java.util.Collection<java.lang.String> paths)
Filer
that include allArchivePath
s that match the given List of paths..- Parameters:
paths
- The paths to included- Returns:
- A Path list based include
Filter
-
excludePaths
public static Filter<ArchivePath> excludePaths(java.lang.String... paths)
Filter
that exclude allArchivePath
s that match the given List of paths.- Parameters:
paths
- The paths to exclude- Returns:
- A Path list based exclude
Filter
-
excludePaths
public static Filter<ArchivePath> excludePaths(java.util.Collection<java.lang.String> paths)
Filter
that exclude allArchivePath
s that match the given List of paths.- Parameters:
paths
- The paths to exclude- Returns:
- A Path list based exclude
Filter
-
exclude
public static Filter<ArchivePath> exclude(java.lang.Package... packages)
Filter
that includes listedPackage
.- Parameters:
packages
- To be included- Returns:
-
include
public static Filter<ArchivePath> include(java.lang.Package... packages)
Filter
that excludes listedPackage
.- Parameters:
packages
- To be excluded- Returns:
-
createRegExpFilter
private static Filter<ArchivePath> createRegExpFilter(java.lang.String filterClassName, java.lang.Package... packages)
-
include
public static Filter<ArchivePath> include(java.lang.Class<?>... classes)
Filter
that includes listedClass
.- Parameters:
classes
- To be included- Returns:
-
exclude
public static Filter<ArchivePath> exclude(java.lang.Class<?>... classes)
Filter
that excludes listedClass
.- Parameters:
classes
- To be excluded- Returns:
-
createRegExpFilter
private static Filter<ArchivePath> createRegExpFilter(java.lang.String regExpFilterImplName, java.lang.Class<?>... classes)
-
getFilterInstance
private static Filter<ArchivePath> getFilterInstance(java.lang.String filterClassName, java.lang.Class<?>[] ctorTypes, java.lang.Object[] ctorArguments)
Creates a newFilter
instance using the given impl class name, constructor arguments and type- Parameters:
filterClassName
-ctorTypes
-ctorArguments
-- Returns:
-
-