Build 1.0_r1(from source)

dalvik.system
Class TouchDexLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by dalvik.system.TouchDexLoader

 class TouchDexLoader
extends ClassLoader

Cloned out of PathClassLoader for TouchDex. This could be made substantially smaller, since we don't need most of this.


Constructor Summary
TouchDexLoader(String path, ClassLoader parent)
          Create a ClassLoader that finds files in the specified path.
 
Method Summary
protected  Class<?> findClass(String name)
          Find the class with the specified name.
protected  String findLibrary(String libname)
          Find a native library.
protected  URL findResource(String name)
          Returns an URL which can be used to access the resource described by resName, using the class loader's resource lookup algorithm.
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLoadedClass, findResources, 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

TouchDexLoader

public TouchDexLoader(String path,
                      ClassLoader parent)
Create a ClassLoader that finds files in the specified path.

Method Detail

findClass

protected Class<?> findClass(String name)
                      throws ClassNotFoundException
Find the class with the specified name. None of our ancestors were able to find it, so it's up to us now. "name" is a "binary name", e.g. "java.lang.String" or "java.net.URLClassLoader$3$1". This method will either return a valid Class object or throw an exception. Does not return null.

Overrides:
findClass in class ClassLoader
Parameters:
name - The name of the class to search for.
Returns:
The class or null.
Throws:
ClassNotFoundException - if the class cannot be found.

findResource

protected URL findResource(String name)
Description copied from class: ClassLoader
Returns an URL which can be used to access the resource described by resName, using the class loader's resource lookup algorithm. The default behavior is just to return null. This should be implemented by a ClassLoader.

Overrides:
findResource in class ClassLoader
Parameters:
name - The name of the resource to find.
Returns:
The location of the resource.

findLibrary

protected String findLibrary(String libname)
Find a native library. Return the full pathname of the first appropriate-looking file we find.

Overrides:
findLibrary in class ClassLoader
Parameters:
libname - The name of the library to find.
Returns:
The library file name or null.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature