public class DefaultPackageScanClassResolver extends org.apache.camel.support.service.ServiceSupport implements org.apache.camel.spi.PackageScanClassResolver, org.apache.camel.StaticService, org.apache.camel.NonManagedService
PackageScanClassResolver| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
log |
| Constructor and Description |
|---|
DefaultPackageScanClassResolver() |
| Modifier and Type | Method and Description |
|---|---|
void |
addClassLoader(ClassLoader classLoader) |
void |
addFilter(org.apache.camel.spi.PackageScanFilter filter) |
protected void |
addIfMatching(org.apache.camel.spi.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 URL |
customResourceLocator(URL url) |
protected List<String> |
doLoadJarClassEntries(InputStream stream,
String urlPath)
Loads all the class entries from the JAR.
|
protected void |
doStart() |
protected void |
doStop() |
protected void |
find(org.apache.camel.spi.PackageScanFilter test,
String packageName,
ClassLoader loader,
Set<Class<?>> classes) |
protected void |
find(org.apache.camel.spi.PackageScanFilter test,
String packageName,
Set<Class<?>> classes) |
Set<Class<?>> |
findAnnotated(Class<? extends Annotation> annotation,
String... packageNames) |
Set<Class<?>> |
findAnnotated(Set<Class<? extends Annotation>> annotations,
String... packageNames) |
Set<Class<?>> |
findByFilter(org.apache.camel.spi.PackageScanFilter filter,
String... packageNames) |
Set<Class<?>> |
findImplementations(Class<?> parent,
String... packageNames) |
Set<ClassLoader> |
getClassLoaders() |
protected Enumeration<URL> |
getResources(ClassLoader loader,
String packageName)
Strategy to get the resources by the given classloader.
|
boolean |
isAcceptableScheme(String urlPath) |
void |
removeFilter(org.apache.camel.spi.PackageScanFilter filter) |
void |
setAcceptableSchemes(String schemes) |
doInit, doResume, doShutdown, doSuspend, getStatus, init, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendprotected final org.slf4j.Logger log
public DefaultPackageScanClassResolver()
public void addClassLoader(ClassLoader classLoader)
addClassLoader in interface org.apache.camel.spi.PackageScanClassResolverpublic void addFilter(org.apache.camel.spi.PackageScanFilter filter)
addFilter in interface org.apache.camel.spi.PackageScanClassResolverpublic void removeFilter(org.apache.camel.spi.PackageScanFilter filter)
removeFilter in interface org.apache.camel.spi.PackageScanClassResolverpublic void setAcceptableSchemes(String schemes)
public boolean isAcceptableScheme(String urlPath)
public Set<ClassLoader> getClassLoaders()
getClassLoaders in interface org.apache.camel.spi.PackageScanClassResolverpublic Set<Class<?>> findAnnotated(Class<? extends Annotation> annotation, String... packageNames)
findAnnotated in interface org.apache.camel.spi.PackageScanClassResolverpublic Set<Class<?>> findAnnotated(Set<Class<? extends Annotation>> annotations, String... packageNames)
findAnnotated in interface org.apache.camel.spi.PackageScanClassResolverpublic Set<Class<?>> findImplementations(Class<?> parent, String... packageNames)
findImplementations in interface org.apache.camel.spi.PackageScanClassResolverpublic Set<Class<?>> findByFilter(org.apache.camel.spi.PackageScanFilter filter, String... packageNames)
findByFilter in interface org.apache.camel.spi.PackageScanClassResolverprotected void find(org.apache.camel.spi.PackageScanFilter test, String packageName, Set<Class<?>> classes)
protected void find(org.apache.camel.spi.PackageScanFilter test, String packageName, ClassLoader loader, Set<Class<?>> classes)
protected URL customResourceLocator(URL url) throws IOException
IOExceptionprotected Enumeration<URL> getResources(ClassLoader loader, String packageName) throws IOException
WebSpherePackageScanClassResolver
to take care of WebSphere's oddity of resource loading.loader - the classloaderpackageName - the packagename for the package to loadIOException - is thrown by the classloaderprotected List<String> doLoadJarClassEntries(InputStream stream, String urlPath)
stream - the inputstream of the jar file to be examined for classesurlPath - the url of the jar file to be examined for classesprotected void addIfMatching(org.apache.camel.spi.PackageScanFilter test, String fqn, Set<Class<?>> classes)
test - the test used to determine if the class matchesfqn - the fully qualified name of a classprotected void doStart() throws Exception
doStart in class org.apache.camel.support.service.ServiceSupportExceptionApache Camel