Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 17th, 2012  |  syntax: None  |  size: 0.63 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Custom class loading/overriding Android-native classes
  2. /**
  3.  * Returns the class with the specified name if it has already been loaded
  4.  * by the virtual machine or {@code null} if it has not yet been loaded.
  5.  *
  6.  * @param className
  7.  *            the name of the class to look for.
  8.  * @return the {@code Class} object or {@code null} if the requested class
  9.  *         has not been loaded.
  10.  */
  11. protected final Class<?> findLoadedClass(String className) {
  12.     ClassLoader loader;
  13.     if (this == BootClassLoader.getInstance())
  14.         loader = null;
  15.     else
  16.         loader = this;
  17.     return VMClassLoader.findLoadedClass(loader, className);
  18. }