| java.lang.Object org.jboss.mx.loading.LoaderRepository
All known Subclasses: org.jboss.mx.loading.BasicLoaderRepository, org.jboss.mx.loading.UnifiedLoaderRepository3,
Method Summary | |
abstract public void | addClassLoader(ClassLoader cl) | abstract public boolean | addClassLoaderURL(ClassLoader cl, URL url) Update the set of URLs known to be associated with a previously added
class loader. | void | cacheLoadedClass(String name, Class cls, ClassLoader cl) | void | clear() | public int | compare(LoaderRepository lr) | public Class | getCachedClass(String classname) | public Vector | getLoaders() | final public static Class | getNativeClassForName(String className) | abstract public URL | getResource(String name, ClassLoader cl) | abstract public void | getResources(String name, ClassLoader cl, List urls) Find all resource URLs for the given name. | public Translator | getTranslator() | public URL[] | getURLs() | abstract public Class | loadClass(String className) Loads a class from the repository. | abstract public Class | loadClass(String name, boolean resolve, ClassLoader cl) | abstract public Class | loadClassBefore(ClassLoader stop, String className) Loads a class from the repository, using the classloaders that were
registered before the given classloader. | abstract public Class | loadClassWithout(ClassLoader loader, String className) Loads a class from the repository, excluding the given
classloader. | abstract public RepositoryClassLoader | newClassLoader(URL url, boolean addToRepository) | abstract public RepositoryClassLoader | newClassLoader(URL url, URL origURL, boolean addToRepository) | abstract public void | removeClassLoader(ClassLoader cl) Remove a cladd loader from the repository. | protected int | reverseCompare(LoaderRepository lr) | public void | setTranslator(Translator t) |
translator | protected Translator translator(Code) | | |
addClassLoader | abstract public void addClassLoader(ClassLoader cl)(Code) | | Add a class loader to the repository
|
addClassLoaderURL | abstract public boolean addClassLoaderURL(ClassLoader cl, URL url)(Code) | | Update the set of URLs known to be associated with a previously added
class loader.
Parameters: cl - Parameters: url - |
compare | public int compare(LoaderRepository lr)(Code) | | Compare two loader repository, by default we do no special ordering
Parameters: lr - the loader repository -1, 0, 1 depending upon the order |
getNativeClassForName | final public static Class getNativeClassForName(String className)(Code) | | Return the class of a java native type
the class, or null if className is not a native class name |
getResource | abstract public URL getResource(String name, ClassLoader cl)(Code) | | Find a resource URL for the given name
Parameters: name - the resource name Parameters: cl - the requesting class loader The resource URL if found, null otherwise |
getResources | abstract public void getResources(String name, ClassLoader cl, List urls)(Code) | | Find all resource URLs for the given name. Since this typically
entails an exhuastive search of the repository it can be a relatively
slow operation.
Parameters: name - the resource name Parameters: cl - the requesting class loader Parameters: urls - a list into which the located resource URLs will be placed |
getTranslator | public Translator getTranslator()(Code) | | |
loadClass | abstract public Class loadClass(String className) throws ClassNotFoundException(Code) | | Loads a class from the repository. This method attempts to load the class
using all the classloader registered to the repository.
Parameters: className - the class to load the found class exception: ClassNotFoundException - when there is no such class |
loadClassBefore | abstract public Class loadClassBefore(ClassLoader stop, String className) throws ClassNotFoundException(Code) | | Loads a class from the repository, using the classloaders that were
registered before the given classloader.
Parameters: stop - consult all the classloaders registered before this onein an attempt to load a class Parameters: className - name of the class to load loaded class instance throws: ClassNotFoundException - if none of the consulted classloaders wereable to load the requested class |
loadClassWithout | abstract public Class loadClassWithout(ClassLoader loader, String className) throws ClassNotFoundException(Code) | | Loads a class from the repository, excluding the given
classloader.
Parameters: loader - the classloader to exclude Parameters: className - the class to load the found class exception: ClassNotFoundException - when there is no such class |
newClassLoader | abstract public RepositoryClassLoader newClassLoader(URL url, boolean addToRepository) throws Exception(Code) | | Create RepositoryClassLoader and optionally add it to the repository
Parameters: url - the URL to use for class loading Parameters: addToRepository - a flag indicating if the CL should be added tothe repository the UCL instance throws: Exception - |
newClassLoader | abstract public RepositoryClassLoader newClassLoader(URL url, URL origURL, boolean addToRepository) throws Exception(Code) | | Create RepositoryClassLoader and optionally add it to the repository
Parameters: url - the URL to use for class loading Parameters: origURL - an orignal URL to use as the URL for the CL CodeSource.This is useful when the url is a local copy that is difficult to use forsecurity policy writing. Parameters: addToRepository - a flag indicating if the CL should be added tothe repository the CL instance throws: Exception - |
removeClassLoader | abstract public void removeClassLoader(ClassLoader cl)(Code) | | Remove a cladd loader from the repository.
Parameters: cl - |
reverseCompare | protected int reverseCompare(LoaderRepository lr)(Code) | | Allow subclasses to override the ordering
Parameters: lr - the loader repository -1, 0, 1 depending upon the order |
setTranslator | public void setTranslator(Translator t)(Code) | | |
|
|