|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.microemu.app.classloader.MIDletClassLoader
public class MIDletClassLoader
Main features of this class loader Security aware - enables load and run app in Webstart. Proper class loading order. MIDlet classes loaded first then system and MicroEmulator classes Proper resource loading order. MIDlet resources only can be loaded. MIDlet Bytecode preprocessing/instrumentation
| Field Summary | |
|---|---|
static boolean |
enhanceCatchBlock
|
static boolean |
instrumentMIDletClasses
|
static boolean |
traceClassLoading
|
static boolean |
traceSystemClassLoading
|
| Constructor Summary | |
|---|---|
MIDletClassLoader(java.lang.ClassLoader parent)
|
|
| Method Summary | |
|---|---|
void |
addClassURL(java.lang.String className)
Appends the Class Location URL to the list of URLs to search for classes and resources. |
void |
addURL(java.net.URL url)
|
boolean |
classLoadByParent(java.lang.String className)
|
void |
configure(MIDletClassLoaderConfig clConfig,
boolean forJad)
|
void |
disableClassPreporcessing(java.lang.Class klass)
Special case for classes injected to MIDlet |
void |
disableClassPreporcessing(java.lang.String className)
|
protected java.lang.Class |
findClass(java.lang.String name)
|
static java.lang.String |
getClassResourceName(java.lang.String className)
|
java.net.URL |
getResource(java.lang.String name)
Finds the resource with the given name. |
java.io.InputStream |
getResourceAsStream(java.lang.String name)
Allow access to resources |
protected java.lang.Class |
loadClass(java.lang.String name,
boolean resolve)
Loads the class with the specified binary name. |
| Methods inherited from class java.net.URLClassLoader |
|---|
definePackage, 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, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean instrumentMIDletClasses
public static boolean traceClassLoading
public static boolean traceSystemClassLoading
public static boolean enhanceCatchBlock
| Constructor Detail |
|---|
public MIDletClassLoader(java.lang.ClassLoader parent)
| Method Detail |
|---|
public void configure(MIDletClassLoaderConfig clConfig,
boolean forJad)
throws java.net.MalformedURLException
java.net.MalformedURLException
public void addClassURL(java.lang.String className)
throws java.net.MalformedURLException
Class - Name
java.net.MalformedURLExceptionpublic void addURL(java.net.URL url)
addURL in class java.net.URLClassLoader
protected java.lang.Class loadClass(java.lang.String name,
boolean resolve)
throws java.lang.ClassNotFoundException
Search order is reverse to standard implemenation
This implementation of this method searches for classes in the following order:
Invoke ClassLoader.findLoadedClass(String) to check if the class has already been loaded.
Invoke the findClass(String) method to find the class in this class loader URLs.
Invoke the loadClass method on the parent class loader. If the parent is
null the class loader built-in to the virtual machine is used, instead.
loadClass in class java.lang.ClassLoaderjava.lang.ClassNotFoundExceptionpublic java.net.URL getResource(java.lang.String name)
The name of a resource is a '/'-separated path name that identifies the resource.
Search order is reverse to standard implementation
This method will first use URLClassLoader.findResource(String) to find the resource. That failing, this method will NOT
invoke the parent class loader if delegatingToParent=false.
getResource in class java.lang.ClassLoadername - The resource name
public java.io.InputStream getResourceAsStream(java.lang.String name)
getResourceAsStream in class java.lang.ClassLoaderpublic boolean classLoadByParent(java.lang.String className)
public void disableClassPreporcessing(java.lang.Class klass)
klass - public void disableClassPreporcessing(java.lang.String className)
public static java.lang.String getClassResourceName(java.lang.String className)
protected java.lang.Class findClass(java.lang.String name)
throws java.lang.ClassNotFoundException
findClass in class java.net.URLClassLoaderjava.lang.ClassNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||