Class ClassFilter
java.lang.Object
org.geysermc.conduit.ClassFilter
Selects classes for
ConduitContext.scanClasses(ClassFilter). Conditions are combined with and.
ClassFilter.filter()
.inPackage("com.example")
.implementsInterface("com.example.api.Plugin")
.extendsClass("com.example.Base").not();
-
Method Summary
Modifier and TypeMethodDescriptionextendsClass(Class<?> superClass) Matches classes extending a class, directly or indirectly.extendsClass(String superClassName) Matches classes extending a class, directly or indirectly.static ClassFilterfilter()Creates a filter with no conditions.implementsInterface(Class<?> interfaceClass) Matches classes implementing an interface, directly or through a superclass or superinterface.implementsInterface(String interfaceName) Matches classes implementing an interface, directly or through a superclass or superinterface.Matches classes in a package or any of its subpackages.not()Inverts the condition added last.
-
Method Details
-
implementsInterface
Matches classes implementing an interface, directly or through a superclass or superinterface.- Parameters:
interfaceClass- the interface- Returns:
- this filter
-
implementsInterface
Matches classes implementing an interface, directly or through a superclass or superinterface.- Parameters:
interfaceName- the binary name of the interface- Returns:
- this filter
- See Also:
-
extendsClass
Matches classes extending a class, directly or indirectly.- Parameters:
superClass- the superclass- Returns:
- this filter
-
extendsClass
Matches classes extending a class, directly or indirectly.- Parameters:
superClassName- the binary name of the superclass- Returns:
- this filter
- See Also:
-
inPackage
Matches classes in a package or any of its subpackages.- Parameters:
packageName- the package name- Returns:
- this filter
-
not
Inverts the condition added last.- Returns:
- this filter
- Throws:
IllegalStateException- if no condition has been added
-
filter
Creates a filter with no conditions.- Returns:
- a filter matching every class
-