|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.impl.DefaultPackageScanClassResolver
public class DefaultPackageScanClassResolver
Default implement of PackageScanClassResolver
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
LOG
|
| Constructor Summary | |
|---|---|
DefaultPackageScanClassResolver()
|
|
| Method Summary | |
|---|---|
void |
addClassLoader(ClassLoader classLoader)
Adds the class loader to the existing loaders |
protected void |
addIfMatching(PackageScanFilter test,
String fqn,
Set<Class> classes)
Add the class designated by the fully qualified class name provided to the set of resolved classes if and only if it is approved by the Test supplied. |
protected void |
find(PackageScanFilter test,
String packageName,
ClassLoader loader,
Set<Class> classes)
|
protected void |
find(PackageScanFilter test,
String packageName,
Set<Class> classes)
|
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)
Attemsp 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. |
protected Enumeration<URL> |
getResources(ClassLoader loader,
String packageName)
Strategy to get the resources by the given classloader. |
void |
setClassLoaders(Set<ClassLoader> classLoaders)
Sets the ClassLoader instances that should be used when scanning for classes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final transient org.apache.commons.logging.Log LOG
| Constructor Detail |
|---|
public DefaultPackageScanClassResolver()
| Method Detail |
|---|
public void addClassLoader(ClassLoader classLoader)
PackageScanClassResolver
addClassLoader in interface PackageScanClassResolverclassLoader - the loader to addpublic Set<ClassLoader> getClassLoaders()
PackageScanClassResolver
getClassLoaders in interface PackageScanClassResolverpublic void setClassLoaders(Set<ClassLoader> classLoaders)
PackageScanClassResolver
setClassLoaders in interface PackageScanClassResolverclassLoaders - loaders to use when scanning for classes
public Set<Class> findAnnotated(Class<? extends Annotation> annotation,
String... packageNames)
PackageScanClassResolver
findAnnotated in interface PackageScanClassResolverannotation - the annotation that should be present on matching classespackageNames - one or more package names to scan (including subpackages) for classes
public Set<Class> findAnnotated(Set<Class<? extends Annotation>> annotations,
String... packageNames)
PackageScanClassResolver
findAnnotated in interface PackageScanClassResolverannotations - the annotations that should be present (any of them) on matching classespackageNames - one or more package names to scan (including subpackages) for classes
public Set<Class> findImplementations(Class parent,
String... packageNames)
PackageScanClassResolver
findImplementations in interface PackageScanClassResolverparent - the class of interface to find subclasses or implementations ofpackageNames - one or more package names to scan (including subpackages) for classes
public Set<Class> findByFilter(PackageScanFilter filter,
String... packageNames)
PackageScanClassResolver
findByFilter in interface PackageScanClassResolverfilter - filter to filter desired classes.packageNames - one or more package names to scan (including subpackages) for classes
protected void find(PackageScanFilter test,
String packageName,
Set<Class> classes)
protected void find(PackageScanFilter test,
String packageName,
ClassLoader loader,
Set<Class> classes)
protected Enumeration<URL> getResources(ClassLoader loader,
String packageName)
throws IOException
WebSpherePacakageScanClassResolver
to take care of WebSphere's odditiy of resource loading.
loader - the classloaderpackageName - the packagename for the package to load
IOException - is thrown by the classloader
protected void addIfMatching(PackageScanFilter test,
String fqn,
Set<Class> classes)
test - the test used to determine if the class matchesfqn - the fully qualified name of a class
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||