public class RMIClassLoader extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getClassAnnotation(java.lang.Class<?> cl)
Returns a string representation of the network location where a remote
endpoint can get the class-definition of the given class.
|
static java.lang.ClassLoader |
getClassLoader(java.lang.String codebase)
Gets a classloader for the given codebase and with the current
context classloader as parent.
|
static RMIClassLoaderSpi |
getDefaultProviderInstance()
Returns the default service provider for
RMIClassLoader. |
static java.lang.Object |
getSecurityContext(java.lang.ClassLoader loader)
Deprecated.
|
static java.lang.Class<?> |
loadClass(java.lang.String name)
Deprecated.
|
static java.lang.Class<?> |
loadClass(java.lang.String codebase,
java.lang.String name) |
static java.lang.Class<?> |
loadClass(java.lang.String codebase,
java.lang.String name,
java.lang.ClassLoader defaultLoader) |
static java.lang.Class<?> |
loadClass(java.net.URL codeBase,
java.lang.String name)
Loads a class from
codeBase. |
static java.lang.Class<?> |
loadProxyClass(java.lang.String codeBase,
java.lang.String[] interfaces,
java.lang.ClassLoader defaultLoader) |
public static java.lang.Class<?> loadClass(java.lang.String name) throws java.net.MalformedURLException, java.lang.ClassNotFoundException
java.net.MalformedURLExceptionjava.lang.ClassNotFoundExceptionpublic static java.lang.Class<?> loadClass(java.lang.String codebase, java.lang.String name) throws java.net.MalformedURLException, java.lang.ClassNotFoundException
java.net.MalformedURLExceptionjava.lang.ClassNotFoundExceptionpublic static java.lang.Class<?> loadClass(java.lang.String codebase, java.lang.String name, java.lang.ClassLoader defaultLoader) throws java.net.MalformedURLException, java.lang.ClassNotFoundException
java.net.MalformedURLExceptionjava.lang.ClassNotFoundExceptionpublic static java.lang.Class<?> loadProxyClass(java.lang.String codeBase, java.lang.String[] interfaces, java.lang.ClassLoader defaultLoader) throws java.net.MalformedURLException, java.lang.ClassNotFoundException
java.net.MalformedURLExceptionjava.lang.ClassNotFoundExceptionpublic static java.lang.Class<?> loadClass(java.net.URL codeBase, java.lang.String name) throws java.net.MalformedURLException, java.lang.ClassNotFoundException
codeBase.
This method delegates to
RMIClassLoaderSpi.loadClass(String, String, ClassLoader) and
passes codeBase.toString() as first argument,
name as second argument and null as third
argument.codeBase - the code base from which to load the classname - the name of the classjava.net.MalformedURLException - if the URL is not well formedjava.lang.ClassNotFoundException - if the requested class cannot be foundpublic static java.lang.ClassLoader getClassLoader(java.lang.String codebase) throws java.net.MalformedURLException
codebase - java.net.MalformedURLException - if the codebase contains a malformed URLpublic static java.lang.String getClassAnnotation(java.lang.Class<?> cl)
cl - public static java.lang.Object getSecurityContext(java.lang.ClassLoader loader)
public static RMIClassLoaderSpi getDefaultProviderInstance()
RMIClassLoader.RMIClassLoader