org.microemu.app.classloader
Class ExtensionsClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by org.microemu.app.classloader.ExtensionsClassLoader

public class ExtensionsClassLoader
extends java.net.URLClassLoader

Class loader for device and other Extensions

Author:
vlads

Constructor Summary
ExtensionsClassLoader(java.net.URL[] urls, java.lang.ClassLoader parent)
           
 
Method Summary
 void addClasspath(java.lang.String classpath)
           
 void addURL(java.net.URL url)
           
 java.net.URL getResource(java.lang.String name)
          Finds the resource with the given name.
 
Methods inherited from class java.net.URLClassLoader
definePackage, findClass, findResource, findResources, getPermissions, getURLs, 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, 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

ExtensionsClassLoader

public ExtensionsClassLoader(java.net.URL[] urls,
                             java.lang.ClassLoader parent)
Method Detail

addURL

public void addURL(java.net.URL url)
Overrides:
addURL in class java.net.URLClassLoader

addClasspath

public void addClasspath(java.lang.String classpath)

getResource

public java.net.URL getResource(java.lang.String name)
Finds the resource with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code.

The name of a resource is a '/'-separated path name that identifies the resource.

Search order is reverse to standard implemenation

This method will first use URLClassLoader.findResource(String) to find the resource. That failing, this method will NOT invoke the parent class loader.

Overrides:
getResource in class java.lang.ClassLoader
Parameters:
name - The resource name
Returns:
A URL object for reading the resource, or null if the resource could not be found or the invoker doesn't have adequate privileges to get the resource.


Copyright © 2001-2009 MicroEmulator Team. All Rights Reserved.