public interface ClassResolver
Modifier and Type | Method and Description |
---|---|
Enumeration<URL> |
loadAllResourcesAsURL(String uri)
Loads the given resources as a URL from all bundles/classloaders
|
InputStream |
loadResourceAsStream(String uri)
Loads the given resource as a stream
|
URL |
loadResourceAsURL(String uri)
Loads the given resource as a URL
|
Enumeration<URL> |
loadResourcesAsURL(String uri)
Loads the given resources as a URL from the current bundle/classloader
|
Class<?> |
resolveClass(String name)
Resolves the given class by its name
|
<T> Class<T> |
resolveClass(String name,
Class<T> type)
Resolves the given class by its name
|
<T> Class<T> |
resolveClass(String name,
Class<T> type,
ClassLoader loader)
Resolves the given class by its name
|
Class<?> |
resolveClass(String name,
ClassLoader loader)
Resolves the given class by its name
|
Class<?> |
resolveMandatoryClass(String name)
Resolves the given class by its name
|
<T> Class<T> |
resolveMandatoryClass(String name,
Class<T> type)
Resolves the given class by its name
|
<T> Class<T> |
resolveMandatoryClass(String name,
Class<T> type,
ClassLoader loader)
Resolves the given class by its name
|
Class<?> |
resolveMandatoryClass(String name,
ClassLoader loader)
Resolves the given class by its name
|
Class<?> resolveClass(String name)
name
- full qualified name of class<T> Class<T> resolveClass(String name, Class<T> type)
name
- full qualified name of classtype
- the expected type of the classClass<?> resolveClass(String name, ClassLoader loader)
name
- full qualified name of classloader
- use the provided class loader<T> Class<T> resolveClass(String name, Class<T> type, ClassLoader loader)
name
- full qualified name of classtype
- the expected type of the classloader
- use the provided class loaderClass<?> resolveMandatoryClass(String name) throws ClassNotFoundException
name
- full qualified name of classClassNotFoundException
- is thrown if class not found<T> Class<T> resolveMandatoryClass(String name, Class<T> type) throws ClassNotFoundException
name
- full qualified name of classtype
- the expected type of the classClassNotFoundException
- is thrown if class not foundClass<?> resolveMandatoryClass(String name, ClassLoader loader) throws ClassNotFoundException
name
- full qualified name of classloader
- use the provided class loaderClassNotFoundException
- is thrown if class not found<T> Class<T> resolveMandatoryClass(String name, Class<T> type, ClassLoader loader) throws ClassNotFoundException
name
- full qualified name of classtype
- the expected type of the classloader
- use the provided class loaderClassNotFoundException
- is thrown if class not foundInputStream loadResourceAsStream(String uri)
uri
- the uri of the resourceURL loadResourceAsURL(String uri)
uri
- the uri of the resourceEnumeration<URL> loadResourcesAsURL(String uri)
uri
- the uri of the resourceEnumeration<URL> loadAllResourcesAsURL(String uri)
uri
- the uri of the resourceApache Camel