public class ClassFilter extends Object implements CPResourceFilter
CPScanner. It contains multiple filtering methods
such as class types, class name and so on.| Constructor and Description |
|---|
ClassFilter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Object subject)
Tells whether the given subject is accepted or not.
|
ClassFilter |
allTypes()
Resets all type filtering options and accepts all classes
|
ClassFilter |
annotationOnly()
Filters annotations only and erases the other type options
|
ClassFilter |
appendAnnotation(Class<? extends Annotation> annotation)
Appends the given annotation to set of annotations to control scanned classes.
|
ClassFilter |
appendClassName(String name)
Adds a class name to this filter.
|
ClassFilter |
appendInterface(Class<?> interfaceClass)
Appends the given interface to set of interfaces to control scanned classes.
|
ClassFilter |
appendSuperClass(Class<?> superClass)
Appends the given class to set of super classes.
|
ClassFilter |
classOnly()
Filters classes only and erases the other type options
|
ClassFilter |
enumOnly()
Filters enums only and erases the other type options
|
boolean |
filterable(Object subject)
Tells if the given subject is filterable by this interface
|
ClassFilter |
interfaceOnly()
Filters interfaces only and erases the other type options
|
boolean |
isAnnotationOnly()
tells if the annotation only option is set
|
boolean |
isClassOnly()
tells if the class only option is set
|
boolean |
isEnumOnly()
tells if the enum only option is set
|
boolean |
isInterfaceOnly()
tells if the interface only option is set
|
ClassFilter |
joinAnnotationsWithAnd()
Changes the join behavior of annotations.
|
ClassFilter |
joinAnnotationsWithOr()
Changes the join behavior of annotations.
|
ClassFilter |
joinInterfacesWithAnd()
Changes the join behavior of interfaces.
|
ClassFilter |
joinInterfacesWithOr()
Changes the join behavior of interfaces.
|
public boolean accept(Object subject)
CPResourceFilteraccept in interface CPResourceFiltersubject - parameter to checkpublic boolean filterable(Object subject)
CPResourceFilterfilterable in interface CPResourceFilterpublic ClassFilter appendClassName(String name)
name - class namepublic ClassFilter appendAnnotation(Class<? extends Annotation> annotation)
joinAnnotationsWithAnd().annotation - that to be added to this filterpublic ClassFilter appendInterface(Class<?> interfaceClass)
joinInterfacesWithAnd().interfaceClass - that to be added to this filterpublic ClassFilter appendSuperClass(Class<?> superClass)
superClass - class to be added to set of super classespublic ClassFilter joinAnnotationsWithOr()
public ClassFilter joinInterfacesWithOr()
public ClassFilter joinAnnotationsWithAnd()
public ClassFilter joinInterfacesWithAnd()
public ClassFilter allTypes()
public ClassFilter interfaceOnly()
public ClassFilter annotationOnly()
public ClassFilter enumOnly()
public ClassFilter classOnly()
public boolean isInterfaceOnly()
public boolean isAnnotationOnly()
public boolean isEnumOnly()
public boolean isClassOnly()
Copyright © 2013. All Rights Reserved.