public interface PackageScanClassResolver
Modifier and Type | Method and Description |
---|---|
void |
addClassLoader(ClassLoader classLoader)
Adds the class loader to the existing loaders
|
void |
addFilter(PackageScanFilter filter)
Add a filter that will be applied to all scan operations
|
Set<Class<?>> |
findAnnotated(Class<? extends Annotation> annotation,
String... packageNames)
Attempts to discover classes that are annotated with to the annotation.
|
Set<Class<?>> |
findAnnotated(Set<Class<? extends Annotation>> annotations,
String... packageNames)
Attempts to discover classes that are annotated with to the annotation.
|
Set<Class<?>> |
findByFilter(PackageScanFilter filter,
String... packageNames)
Attempts to discover classes filter by the provided filter
|
Set<Class<?>> |
findImplementations(Class<?> parent,
String... packageNames)
Attempts to discover classes that are assignable to the type provided.
|
Set<ClassLoader> |
getClassLoaders()
Gets the ClassLoader instances that should be used when scanning for classes.
|
void |
removeFilter(PackageScanFilter filter)
Removes the filter
|
void |
setClassLoaders(Set<ClassLoader> classLoaders)
Deprecated.
will be removed in Camel 3.0. Use
addClassLoader(ClassLoader) instead. |
@Deprecated void setClassLoaders(Set<ClassLoader> classLoaders)
addClassLoader(ClassLoader)
instead.classLoaders
- loaders to use when scanning for classesSet<ClassLoader> getClassLoaders()
addClassLoader(ClassLoader)
method if you want to add new classloaders
to the class loaders list.void addClassLoader(ClassLoader classLoader)
classLoader
- the loader to addSet<Class<?>> findAnnotated(Class<? extends Annotation> annotation, String... packageNames)
annotation
- the annotation that should be present on matching classespackageNames
- one or more package names to scan (including subpackages) for classesSet<Class<?>> findAnnotated(Set<Class<? extends Annotation>> annotations, String... packageNames)
annotations
- the annotations that should be present (any of them) on matching classespackageNames
- one or more package names to scan (including subpackages) for classesSet<Class<?>> findImplementations(Class<?> parent, String... packageNames)
parent
- the class of interface to find subclasses or implementations ofpackageNames
- one or more package names to scan (including subpackages) for classesSet<Class<?>> findByFilter(PackageScanFilter filter, String... packageNames)
filter
- filter to filter desired classes.packageNames
- one or more package names to scan (including subpackages) for classesvoid addFilter(PackageScanFilter filter)
filter
- filter to filter desired classes in all scan operationsvoid removeFilter(PackageScanFilter filter)
filter
- filter to filter desired classes in all scan operationsApache Camel