org.jboss.bootstrap
Class NoAnnotationURLClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by org.jboss.bootstrap.NoAnnotationURLClassLoader

public class NoAnnotationURLClassLoader
extends URLClassLoader

A URL classloader to avoid URL annotation of classes in RMI

Version:
$Revision: 83871 $
Author:
Adrian Brock

Constructor Summary
NoAnnotationURLClassLoader(URL[] urls)
          Construct a URLClassLoader
NoAnnotationURLClassLoader(URL[] urls, ClassLoader parent)
          Construct a URLClassLoader
NoAnnotationURLClassLoader(URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory)
          Construct a URLClassLoader
 
Method Summary
static NoAnnotationURLClassLoader createClassLoader(ClassLoader parent, URL... urls)
          Create a classloader
static NoAnnotationURLClassLoader createClassLoader(URL... urls)
          Create a classloader with the context classloader as parent
 URL[] getAllURLs()
          Return all library URLs
 URL[] getURLs()
          Return an empty URL array to force the RMI marshalling subsystem to use the java.server.codebase property as the annotated codebase.
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findClass, findResource, findResources, getPermissions, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoAnnotationURLClassLoader

public NoAnnotationURLClassLoader(URL[] urls)
Construct a URLClassLoader

Parameters:
urls - the URLs to load classes from.

NoAnnotationURLClassLoader

public NoAnnotationURLClassLoader(URL[] urls,
                                  ClassLoader parent)
Construct a URLClassLoader

Parameters:
urls - the URLs to load classes from.
parent - the parent classloader.

NoAnnotationURLClassLoader

public NoAnnotationURLClassLoader(URL[] urls,
                                  ClassLoader parent,
                                  URLStreamHandlerFactory factory)
Construct a URLClassLoader

Parameters:
urls - the URLs to load classes from.
parent - the parent classloader.
factory - the url stream factory.
Method Detail

createClassLoader

public static NoAnnotationURLClassLoader createClassLoader(URL... urls)
Create a classloader with the context classloader as parent

Parameters:
urls - the urls
Returns:
the classloader

createClassLoader

public static NoAnnotationURLClassLoader createClassLoader(ClassLoader parent,
                                                           URL... urls)
Create a classloader

Parameters:
parent - the parent classloader
urls - the urls
Returns:
the classloader

getAllURLs

public URL[] getAllURLs()
Return all library URLs

Do not remove this method without running the WebIntegrationTestSuite

Returns:
the urls

getURLs

public URL[] getURLs()
Return an empty URL array to force the RMI marshalling subsystem to use the java.server.codebase property as the annotated codebase.

Do not remove this method without discussing it on the dev list.

Overrides:
getURLs in class URLClassLoader
Returns:
Empty URL[]


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.