title: ClassLoader to replace a pre-loaded class?
body: <p><strong>General question:</strong>
  Is it possible to use a ClassLoader to replace a pre-loaded (by the system, e.g. found in Android's <em>%android%/frameworks/base/preloaded-classes</em> file) class?</p>
  
  <p><strong>Specific:</strong>
  I am attempting to use the DexClassLoader to replace a class found in android.net.* before creating a WebView in my application. I can get a Class object, but getMethods() for example gives me an array I'd expect in the unmodified/original class implementation. Is this due to the preloaded-classes system?</p>
  
  <p><strong>Basic setup &amp; pseudo code:</strong></p>
  
  <ol>
  <li>Modify android.net.* class, adding a few test methods/etc.</li>
  <li>Compile and end up with classes.dex</li>
  <li>jar cf mytest.jar classes.dex</li>
  <li>Include mytest.jar in APK assets</li>
  <li>Create DexClassLoader and get Class via loadClass()</li>
  <li>getMethods() on Class object returns an array I'd expect to see without modifications present in #1</li>
  </ol>
  
  <p>I can provide more details on the setup I'm using and code if needed.</p>