org.jboss.classloader.plugins.filter
Class CombiningClassFilter

java.lang.Object
  extended by org.jboss.classloader.plugins.filter.CombiningClassFilter
All Implemented Interfaces:
ClassFilter

public class CombiningClassFilter
extends Object
implements ClassFilter

CombiningClassFilter.

Version:
$Revision: 1.1 $
Author:
Adrian Brock

Field Summary
 
Fields inherited from interface org.jboss.classloader.spi.filter.ClassFilter
EVERYTHING, JAVA_ONLY, NOTHING, NOTHING_BUT_JAVA
 
Constructor Summary
CombiningClassFilter(boolean and, ClassFilter[] filters)
          Create a new CombiningClassFilter.
 
Method Summary
static CombiningClassFilter create(boolean and, ClassFilter... filters)
          Create a new CombiningClassFilter.
static CombiningClassFilter create(ClassFilter... filters)
          Create a new CombiningClassFilter.
 boolean matchesClassName(String className)
          Whether the class name matches the filter
 boolean matchesPackageName(String packageName)
          Whether the package name matches the filter
 boolean matchesResourcePath(String resourcePath)
          Whether the resource name matches the filter
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CombiningClassFilter

public CombiningClassFilter(boolean and,
                            ClassFilter[] filters)
Create a new CombiningClassFilter.

Parameters:
and - whether it is an "and" filter
filters - the filters
Throws:
IllegalArgumentException - for null filters
Method Detail

create

public static CombiningClassFilter create(ClassFilter... filters)
Create a new CombiningClassFilter.

Parameters:
filters - the filters
Returns:
the filter
Throws:
IllegalArgumentException - for null filters

create

public static CombiningClassFilter create(boolean and,
                                          ClassFilter... filters)
Create a new CombiningClassFilter.

Parameters:
and - whether it is an "and" filter
filters - the filters
Returns:
the filter
Throws:
IllegalArgumentException - for null filters

matchesClassName

public boolean matchesClassName(String className)
Description copied from interface: ClassFilter
Whether the class name matches the filter

Specified by:
matchesClassName in interface ClassFilter
Parameters:
className - the class name
Returns:
true when it matches the filter

matchesResourcePath

public boolean matchesResourcePath(String resourcePath)
Description copied from interface: ClassFilter
Whether the resource name matches the filter

Specified by:
matchesResourcePath in interface ClassFilter
Parameters:
resourcePath - the resource path
Returns:
true when it matches the filter

matchesPackageName

public boolean matchesPackageName(String packageName)
Description copied from interface: ClassFilter
Whether the package name matches the filter

Specified by:
matchesPackageName in interface ClassFilter
Parameters:
packageName - the package path
Returns:
true when it matches the filter

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.