Package com.axelor.common.reflections
Class ClassFinder<T>
java.lang.Object
com.axelor.common.reflections.ClassFinder<T>
The helper class to find sub types of a given super class.
-
Method Summary
Modifier and TypeMethodDescriptionany()In case of multiplehaving(Class)calls, whether to check any one annotation (by default all annotations are checked).Find with the given URL pattern.find()Find the classes.having(Class<? extends Annotation> annotation) Only search classes with the given annotation.ClassFinder<?> using(ClassLoader loader) Search using the given class loader.Only search within the given package name.
-
Method Details
-
byURL
Find with the given URL pattern.- Parameters:
pattern- the URL pattern- Returns:
- the same finder
-
within
Only search within the given package name.- Parameters:
packageName- the package name- Returns:
- same class finder instance
-
using
Search using the given class loader.- Parameters:
loader- the class loader- Returns:
- the class finder instance
-
having
Only search classes with the given annotation.- Parameters:
annotation- the annotation to check- Returns:
- same class finder instance
-
any
In case of multiplehaving(Class)calls, whether to check any one annotation (by default all annotations are checked).- Returns:
- same class finder instance
-
find
Find the classes.- Returns:
- set of matched classes
-