java.lang.Object java.rmi.server.RMIClassLoaderpublic class RMIClassLoader extends Object static String getClassAnnotation(Class> cl)static ClassLoader getClassLoader(String codebase)static RMIClassLoaderSpi getDefaultProviderInstance()RMIClassLoader.
static Object getSecurityContext(ClassLoader loader)static Class> loadClass(String codebase, String name, ClassLoader defaultLoader)static Class> loadProxyClass(String codeBase, String[] interfaces, ClassLoader defaultLoader)public static String getClassAnnotation(Class> cl)
Returns a string representation of the network location where a remote endpoint can get the class-definition of the given class.
- Parameters:
cl-
- Returns:
- a space seperated list of URLs where the class-definition of cl may be found
public static ClassLoader getClassLoader(String codebase) throws MalformedURLException
Gets a classloader for the given codebase and with the current context classloader as parent.
- Parameters:
codebase-
- Returns:
- a classloader for the given codebase
- Throws:
MalformedURLException- if the codebase contains a malformed URL
public static RMIClassLoaderSpi getDefaultProviderInstance()
Returns the default service provider forRMIClassLoader.
- Returns:
- the default provider for
RMIClassLoader
public static Class> loadClass(String name) throws MalformedURLException, ClassNotFoundException
Deprecated.
public static Class> loadClass(String codebase, String name) throws MalformedURLException, ClassNotFoundException
public static Class> loadClass(String codebase, String name, ClassLoader defaultLoader) throws MalformedURLException, ClassNotFoundException
public static Class> loadClass(URL codeBase, String name) throws MalformedURLException, ClassNotFoundException
Loads a class fromcodeBase. This method delegates toRMIClassLoaderSpi.loadClass(String,String,ClassLoader)and passescodeBase.toString()as first argument,nameas second argument andnullas third argument.
- Parameters:
codeBase- the code base from which to load the classname- the name of the class
- Returns:
- the loaded class
- Throws:
MalformedURLException- if the URL is not well formedClassNotFoundException- if the requested class cannot be found
public static Class> loadProxyClass(String codeBase, String[] interfaces, ClassLoader defaultLoader) throws MalformedURLException, ClassNotFoundException